Skip to content

Commit 4f101a6

Browse files
committed
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
2 parents 6d3f290 + e980765 commit 4f101a6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

git-pull.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ test true = "$rebase" && {
200200
require_clean_work_tree "pull with rebase" "Please commit or stash them."
201201
fi
202202
oldremoteref= &&
203+
test -n "$curr_branch" &&
203204
. git-parse-remote &&
204205
remoteref="$(get_remote_merge_branch "$@" 2>/dev/null)" &&
205206
oldremoteref="$(git rev-parse -q --verify "$remoteref")" &&

0 commit comments

Comments
 (0)