]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-branch.c
add logref support to git-symbolic-ref
[thirdparty/git.git] / builtin-branch.c
index d60690bb084ef83ce99a56453ae9dfa56da12807..76f174fd89b6841ba395d25cb089d2c615f5dd37 100644 (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);
 }