Skip to content
Snippets Groups Projects
Commit 8a217dd4 authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

update: tweak stash/checkout behavior. (#312)

Always pop stashed changes for Homebrew developers and only checkout
original branches for them (to avoid users who don't understand Git
ending up "stuck" on branches).
parent 5e272257
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ reset_on_interrupt() {
git reset --hard "$INITIAL_REVISION" "${QUIET_ARGS[@]}"
fi
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
if [[ -n "$HOMEBREW_DEVELOPER" ]]
then
pop_stash
else
......@@ -225,10 +225,13 @@ pull() {
trap '' SIGINT
if [[ -n "$HOMEBREW_DEVELOPER" ]] &&
[[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
if [[ -n "$HOMEBREW_DEVELOPER" ]]
then
git checkout "${QUIET_ARGS[@]}" "$INITIAL_BRANCH"
if [[ "$INITIAL_BRANCH" != "$UPSTREAM_BRANCH" && -n "$INITIAL_BRANCH" ]]
then
git checkout "$INITIAL_BRANCH"
fi
pop_stash
else
pop_stash_message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment