Initial commit
This commit is contained in:
22
functions/poup.fish
Normal file
22
functions/poup.fish
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
Reference in New Issue
Block a user