update.sh: abort rebase and merge.

`brew update` can cause these so `brew update` should repair these.
This commit is contained in:
Mike McQuaid 2016-05-03 15:28:00 +01:00
parent 60e3737f17
commit 70096f8e91

View File

@ -121,6 +121,8 @@ reset_on_interrupt() {
if [[ -n "$INITIAL_REVISION" ]] if [[ -n "$INITIAL_REVISION" ]]
then then
git rebase --abort &>/dev/null
git merge --abort &>/dev/null
git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}" git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}"
fi fi
@ -179,6 +181,7 @@ pull() {
git status --short --untracked-files=all git status --short --untracked-files=all
fi fi
git merge --abort &>/dev/null git merge --abort &>/dev/null
git rebase --abort &>/dev/null
git -c "user.email=brew-update@localhost" \ git -c "user.email=brew-update@localhost" \
-c "user.name=brew update" \ -c "user.name=brew update" \
stash save --include-untracked "${QUIET_ARGS[@]}" stash save --include-untracked "${QUIET_ARGS[@]}"