summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-11-18 19:33:45 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-11-18 19:33:45 -0800
commit611addf8900efc19a859f3f0afc680fe53831527 (patch)
treeaae4dc0ea965dde90a10dbebf284dc5116391232
parentMerge branch 'mm/maint-doc-remote-tracking' into maint (diff)
parentgit-pull: Avoid merge-base on detached head (diff)
downloadtgif-611addf8900efc19a859f3f0afc680fe53831527.tar.xz
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")" &&