summaryrefslogtreecommitdiff
path: root/branch.c
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-08-19 13:45:43 +0200
committerJunio C Hamano <gitster@pobox.com>2011-08-19 11:01:36 -0700
commite9d4f7405b6ab399ef0ea62a796c646de676555d (patch)
tree309ae2ed0ff47ef9baa51d58f7721457888f462f /branch.c
parentec099546a9afdb73b6bf39d5d684e6fb207e2a7f (diff)
downloadgit-e9d4f7405b6ab399ef0ea62a796c646de676555d.tar.gz
branch.c: use the parsed branch name
When setting up tracking info, branch.c uses the given branch specifier ("name"). Use the parsed name ("ref.buf") instead so that git branch --set-upstream @{-1} foo sets up tracking info for the previous branch rather than for a branch named "@{-1}". Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'branch.c')
-rw-r--r--branch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/branch.c b/branch.c
index c0c865a4b1..d62cc0132c 100644
--- a/branch.c
+++ b/branch.c
@@ -210,7 +210,7 @@ void create_branch(const char *head,
start_name);
if (real_ref && track)
- setup_tracking(name, real_ref, track);
+ setup_tracking(ref.buf+11, real_ref, track);
if (!dont_change_ref)
if (write_ref_sha1(lock, sha1, msg) < 0)