diff options
author | Karel Kočí <karel.koci@nic.cz> | 2019-11-04 09:59:40 +0100 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2019-11-04 09:59:40 +0100 |
commit | 69d76eb5bcbe2b03ce781d95ff416fb189c363a6 (patch) | |
tree | 34c26daa76d5987f1d27a03d8cbc875127069e37 /shellrc.d | |
parent | e49c1a5fcb078a56bf2199aa75b464b6fdfaf5fd (diff) | |
download | shellrc-0.7.4.tar.gz shellrc-0.7.4.tar.bz2 shellrc-0.7.4.zip |
shellrc.d/git: tweak syntax for gitbmergev0.7.4
Diffstat (limited to 'shellrc.d')
-rw-r--r-- | shellrc.d/git | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/shellrc.d/git b/shellrc.d/git index 870622f..2dac8bb 100644 --- a/shellrc.d/git +++ b/shellrc.d/git @@ -3,8 +3,7 @@ # Automatic branch merger (merge branch, push it to server and remove branch) # Expects name of the branch as argument # It fails if it's not fast forward merge and if there is fixup! commit. -gitbmerge() { - ( +gitbmerge() ( set -e if [ -n "$(git log --grep="^fixup\!" HEAD.."$1")" ]; then echo "First squash fixups!" @@ -16,8 +15,7 @@ gitbmerge() { git worktree prune fi git merge --ff-only "$1" && git push && git branch -d "$1" && git push origin :"$1" - ) -} +) # Checkout branch to new work tree gitbcheckout() { |