summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-08 18:06:05 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-08 18:06:05 -0500
commitdc8d18af6c92a24b659c0edb41d510ba9d0887bb (patch)
treed74ddfdc57d7faeb16f5208303cad70755c7d0b3
parentc04e2d0f621bcec15b7662e6d49bf96136bf2260 (diff)
downloadgit-update-agent-dc8d18af6c92a24b659c0edb41d510ba9d0887bb.tar.xz
git-update-agent-dc8d18af6c92a24b659c0edb41d510ba9d0887bb.zip
Abort merge w/o failing out when no merge occurs
-rwxr-xr-xgit-update-agent4
1 files changed, 2 insertions, 2 deletions
diff --git a/git-update-agent b/git-update-agent
index 7a0b98d..6d1ebdb 100755
--- a/git-update-agent
+++ b/git-update-agent
@@ -116,8 +116,8 @@ merge() {
if [[ -n "$(git status --untracked-files=all --porcelain 2>/dev/null)" ]]; then
# Abort rebase or merge if initiated
- git merge --abort &>/dev/null
- git rebase --abort &>/dev/null
+ git merge --abort &>/dev/null || true
+ git rebase --abort &>/dev/null || true
stash
STASHED="1"