From: Junio C Hamano Date: Mon, 13 Dec 2010 05:49:51 +0000 (-0800) Subject: Merge branch 'mz/pull-rebase-rebased' X-Git-Tag: v1.7.4-rc0~63 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/73fd7f3761eeef0e28bbf04727c8a1e751a9792e?hp=-c Merge branch 'mz/pull-rebase-rebased' * mz/pull-rebase-rebased: Use reflog in 'pull --rebase . foo' --- 73fd7f3761eeef0e28bbf04727c8a1e751a9792e diff --combined git-parse-remote.sh index 4da72aefbd,375a0ba59e..1cc2ba6e09 --- a/git-parse-remote.sh +++ b/git-parse-remote.sh @@@ -66,7 -66,7 +66,7 @@@ get_remote_merge_branch () origin="$1" default=$(get_default_remote) test -z "$origin" && origin=$default - curr_branch=$(git symbolic-ref -q HEAD) + curr_branch=$(git symbolic-ref -q HEAD) && [ "$origin" = "$default" ] && echo $(git for-each-ref --format='%(upstream)' $curr_branch) ;; @@@ -89,7 -89,13 +89,13 @@@ refs/heads/*) remote=${remote#refs/heads/} ;; refs/* | tags/* | remotes/* ) remote= esac - - [ -n "$remote" ] && echo "refs/remotes/$repo/$remote" + [ -n "$remote" ] && case "$repo" in + .) + echo "refs/heads/$remote" + ;; + *) + echo "refs/remotes/$repo/$remote" + ;; + esac esac }