diff options
Diffstat (limited to 'shellrc.d/git')
-rw-r--r-- | shellrc.d/git | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/shellrc.d/git b/shellrc.d/git index a662cb0..493d89b 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -12,10 +12,14 @@ _gitbworktree() { # It fails if it's not fast forward merge and if there is fixup! commit. gitbmerge() ( set -e - if [ -n "$(git log --grep="^fixup\!" HEAD.."$1")" ]; then + [ -z "$(git log --grep="^fixup\!" HEAD.."$1")" ] || { echo "First squash fixups!" - exit 1 - fi + return 1 + } + [ -z "$(git log --grep="^Apply suggestion to " HEAD.."$1")" ] || { + echo "First squash suggestions!" + return 1 + } local wt wt="$(_gitbworktree "$1")" if [ -n "$wt" ]; then |