2025-03-18 19:21:17 +01:00

23 lines
686 B
Fish

function poup
set toml_state (git status --porcelain pyproject.toml | head -c 2)
if test "$toml_state" = UU
echo "pyproject.toml has conflicts, resolve those first"
git mergetool pyproject.toml; or return
set toml_state (git status --porcelain pyproject.toml | head -c 2)
end
if test "$toml_state" = "M " -o "$toml_state" = MM -o "$toml_state" = " M"
git checkout --ours poetry.lock
poetry lock --no-update
and git add poetry.lock
end
set toml_state (git status --porcelain poetry.lock | head -c 2)
if test "$toml_state" = UU
git checkout --ours poetry.lock
git add poetry.lock
end
end