Merge branch 'rk/commit-tree-make-F-verbatim' into maint
[gitweb.git] / builtin / merge.c
index 6150571a56f3996986cc204fd79e86260c02bad7..23c53a3082b26e8f89f8be1f14985acc491d9907 100644 (file)
@@ -1126,8 +1126,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
         * current branch.
         */
        branch = branch_to_free = resolve_refdup("HEAD", 0, head_oid.hash, NULL);
-       if (branch && starts_with(branch, "refs/heads/"))
-               branch += 11;
+       if (branch)
+               skip_prefix(branch, "refs/heads/", &branch);
        if (!branch || is_null_oid(&head_oid))
                head_commit = NULL;
        else