add replay and log to the usage string of git-bisect
[gitweb.git] / builtin-branch.c
index eaff54ec5f045c479fa08b9d2ba5d16a5e5dee47..2d8d61b453ede72b8d0319cb192f9f06a024d8c0 100644 (file)
@@ -364,7 +364,7 @@ static void rename_branch(const char *oldname, const char *newname, int force)
        unsigned char sha1[20];
 
        if (!oldname)
-               die("cannot rename the curren branch while not on any.");
+               die("cannot rename the current branch while not on any.");
 
        if (snprintf(oldref, sizeof(oldref), "refs/heads/%s", oldname) > sizeof(oldref))
                die("Old branchname too long");
@@ -387,7 +387,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);
 }