summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2012-11-04 08:00:06 -0500
committerLibravatar Jeff King <peff@peff.net>2012-11-04 08:00:06 -0500
commit4f101a6cf41da743e40e83d045455f8c180dde88 (patch)
tree90aa39fdc1eba3261e2ed98efd5c37dec6005a82
parentMerge branch 'mm/maint-doc-remote-tracking' (diff)
parentgit-pull: Avoid merge-base on detached head (diff)
downloadtgif-4f101a6cf41da743e40e83d045455f8c180dde88.tar.xz
Merge branch 'ph/pull-rebase-detached'
Avoids spewing error messages when using "pull --rebase" on a detached HEAD. * 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")" &&