diff options
Diffstat (limited to 'shellrc.d')
-rw-r--r-- | shellrc.d/git | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/shellrc.d/git b/shellrc.d/git index 3cf6117..7c34846 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -13,11 +13,15 @@ _gitbworktree() { gitbmerge() ( set -e [ -z "$(git log --grep="^fixup\!" HEAD.."$1")" ] || { - echo "First squash fixups!" + echo "First squash fixups!" >&2 return 1 } [ -z "$(git log --grep="^Apply .* suggestion(s) to " HEAD.."$1")" ] || { - echo "First squash suggestions!" + echo "First squash suggestions!" >&2 + return 1 + } + [ "$(git rev-parse HEAD)" != "$(git rev-parse "$1")" ] || { + echo "Nothing to merge! 🤷" >&2 return 1 } local wt |