From 69d76eb5bcbe2b03ce781d95ff416fb189c363a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 4 Nov 2019 09:59:40 +0100 Subject: shellrc.d/git: tweak syntax for gitbmerge --- shellrc.d/git | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'shellrc.d/git') 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() { -- cgit v1.2.3