add logref support to git-symbolic-ref

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Nicolas Pitre
2007-01-26 17:26:10 -05:00
committed by Junio C Hamano
parent 41b625b047
commit 8b5157e407
6 changed files with 35 additions and 8 deletions

View File

@ -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);
}