diff options
author | Karel Kočí <karel.koci@nic.cz> | 2020-06-30 13:02:40 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2020-06-30 13:03:13 +0200 |
commit | 0e16c65fd2ced7b8970747f148522f1c54b2a081 (patch) | |
tree | 37e7bfd25cee345a5c28c23f0a03cc1b80370309 | |
parent | 47ab7852e49ac9a78b5715f1cbfce0317f47054c (diff) | |
download | shellrc-0e16c65fd2ced7b8970747f148522f1c54b2a081.tar.gz shellrc-0e16c65fd2ced7b8970747f148522f1c54b2a081.tar.bz2 shellrc-0e16c65fd2ced7b8970747f148522f1c54b2a081.zip |
shellrc.d/git: gitbmerge error on applied suggestions commits
These are commits created by Gitlab and should not be in tree neither
(same as fixup commits).
-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 |