aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorMike McQuaid2016-05-03 15:28:00 +0100
committerMike McQuaid2016-05-03 15:28:00 +0100
commit70096f8e919aa7d14234dc934d8ab30a5c946f59 (patch)
tree051c76cb32cecff3158db48884cb08c3b581bc5b /Library/Homebrew
parent60e3737f17614e43856af6f1ccfba663374a5f43 (diff)
downloadbrew-70096f8e919aa7d14234dc934d8ab30a5c946f59.tar.bz2
update.sh: abort rebase and merge.
`brew update` can cause these so `brew update` should repair these.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/cmd/update.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index cff66f7b4..963e13a54 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -121,6 +121,8 @@ reset_on_interrupt() {
if [[ -n "$INITIAL_REVISION" ]]
then
+ git rebase --abort &>/dev/null
+ git merge --abort &>/dev/null
git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}"
fi
@@ -179,6 +181,7 @@ pull() {
git status --short --untracked-files=all
fi
git merge --abort &>/dev/null
+ git rebase --abort &>/dev/null
git -c "user.email=brew-update@localhost" \
-c "user.name=brew update" \
stash save --include-untracked "${QUIET_ARGS[@]}"