aboutsummaryrefslogtreecommitdiff
path: root/builtin-branch.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-01-26 17:26:10 -0500
committerJunio C Hamano <junkio@cox.net>2007-01-28 02:16:46 -0800
commit8b5157e40718a2ee1d645c342d93df4e66335479 (patch)
tree3e81ee8c1e122f82254cb8775076dad36c6fcd76 /builtin-branch.c
parent41b625b047ad5c537ca312d2f07c86bdd783a7b0 (diff)
downloadgit-8b5157e40718a2ee1d645c342d93df4e66335479.tar.gz
git-8b5157e40718a2ee1d645c342d93df4e66335479.tar.xz
add logref support to git-symbolic-ref
Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-branch.c')
-rw-r--r--builtin-branch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-branch.c b/builtin-branch.c
index d60690bb0..76f174fd8 100644
--- a/builtin-branch.c
+++ b/builtin-branch.c
@@ -381,7 +381,8 @@ static void rename_branch(const char *oldname, const char *newname, int force)
if (rename_ref(oldref, newref, logmsg))
die("Branch rename failed");
- if (!strcmp(oldname, head) && create_symref("HEAD", newref))
+ /* no need to pass logmsg here as HEAD didn't really move */
+ if (!strcmp(oldname, head) && create_symref("HEAD", newref, NULL))
die("Branch renamed to %s, but HEAD is not updated!", newname);
}