aboutsummaryrefslogtreecommitdiff
path: root/shellrc.d/git
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2019-11-04 09:59:40 +0100
committerKarel Kočí <karel.koci@nic.cz>2019-11-04 09:59:40 +0100
commit69d76eb5bcbe2b03ce781d95ff416fb189c363a6 (patch)
tree34c26daa76d5987f1d27a03d8cbc875127069e37 /shellrc.d/git
parente49c1a5fcb078a56bf2199aa75b464b6fdfaf5fd (diff)
downloadshellrc-69d76eb5bcbe2b03ce781d95ff416fb189c363a6.tar.gz
shellrc-69d76eb5bcbe2b03ce781d95ff416fb189c363a6.tar.bz2
shellrc-69d76eb5bcbe2b03ce781d95ff416fb189c363a6.zip
shellrc.d/git: tweak syntax for gitbmergev0.7.4
Diffstat (limited to 'shellrc.d/git')
-rw-r--r--shellrc.d/git6
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() {