feat(bin): support merge-patch --skip

When hitting a conflict with no changes you can `--skip` just like you would if
you where rebaseing and running `rebase --skip`
This commit is contained in:
Ade Attwood 2022-02-15 20:31:59 +00:00
parent f386272007
commit a94a9d6dc2

View file

@ -38,12 +38,12 @@ if [[ ! -z "$(git diff --name-only --diff-filter=U)" ]]; then
exit 1
fi
if [[ "$MERGE_BRANCH" == "--abort" ]]; then
if [[ "$MERGE_BRANCH" == "--abort" ]] || [[ "$MERGE_BRANCH" == "--skip" ]]; then
#
# If we are in a rebase state then we want to abort that to
#
if [[ -f "$(git rev-parse --show-toplevel)/.git/REBASE_HEAD" ]]; then
git rebase --abort
git rebase $MERGE_BRANCH
fi
if [[ -f "$(git rev-parse --show-toplevel)/.git/MERGE_PATCH" ]]; then