summaryrefslogtreecommitdiff
path: root/git-parse-remote.sh
diff options
context:
space:
mode:
authorMartin von Zweigbergk <martin.von.zweigbergk@gmail.com>2010-11-13 23:58:22 +0100
committerJunio C Hamano <gitster@pobox.com>2010-11-29 15:06:40 -0800
commitfe249b4219f66ae3aacfac50ad19b38c370ad115 (patch)
tree1856bcb80e9f3306e26f6b325b6a0964ed2c6d1c /git-parse-remote.sh
parent7d43de925b2771d295d8fc4341b7bd544e2a74fa (diff)
downloadgit-fe249b4219f66ae3aacfac50ad19b38c370ad115.tar.gz
Use reflog in 'pull --rebase . foo'
Since c85c792 (pull --rebase: be cleverer with rebased upstream branches, 2008-01-26), "git pull --rebase" has used the reflog to try to rebase from the old upstream onto the new upstream. Make this work if the local repository is explicitly passed on the command line as in 'git pull --rebase . foo'. Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> Acked-by: Santi BĂ©jar <santi@agolina.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-parse-remote.sh')
-rw-r--r--git-parse-remote.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/git-parse-remote.sh b/git-parse-remote.sh
index 5f47b18141..375a0ba59e 100644
--- a/git-parse-remote.sh
+++ b/git-parse-remote.sh
@@ -89,7 +89,13 @@ get_remote_merge_branch () {
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
}