Skip to content

Commit

Permalink
Merge branch 'ph/pull-rebase-detached' into maint
Browse files Browse the repository at this point in the history
"git pull --rebase" run while the HEAD is detached tried to find
the upstream branch of the detached HEAD (which by definition
does not exist) and emitted unnecessary error messages.

* ph/pull-rebase-detached:
  git-pull: Avoid merge-base on detached head
  • Loading branch information
Junio C Hamano committed Nov 19, 2012
2 parents 78ba7e2 + e980765 commit 611addf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions git-pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ test true = "$rebase" && {
require_clean_work_tree "pull with rebase" "Please commit or stash them."
fi
oldremoteref= &&
test -n "$curr_branch" &&
. git-parse-remote &&
remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" &&
oldremoteref="$(git rev-parse -q --verify "$remoteref")" &&
Expand Down

0 comments on commit 611addf

Please sign in to comment.