summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-18 19:33:45 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-18 19:33:45 -0800
commit611addf8900efc19a859f3f0afc680fe53831527 (patch)
treeaae4dc0ea965dde90a10dbebf284dc5116391232
parent78ba7e267caaa696746243888db363f83a061b61 (diff)
parente980765c59c173e9a10ce1069c763645b87fd50c (diff)
downloadgit-611addf8900efc19a859f3f0afc680fe53831527.tar.gz
Merge branch 'ph/pull-rebase-detached' into maint
"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
-rwxr-xr-xgit-pull.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-pull.sh b/git-pull.sh
index 2a10047eb7..266e682f6c 100755
--- a/git-pull.sh
+++ b/git-pull.sh
@@ -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")" &&