git-svn: correctly access repos when only given partial read permissions
[gitweb.git] / builtin-fmt-merge-msg.c
index b93c17c2f036b972ed6be3b5029251681acfeec7..87d3d63ec71ec7f08127085330d28ed28e3f35c7 100644 (file)
@@ -277,7 +277,9 @@ int cmd_fmt_merge_msg(int argc, const char **argv, const char *prefix)
                usage(fmt_merge_msg_usage);
 
        /* get current branch */
-       current_branch = resolve_ref("HEAD", head_sha1, 1);
+       current_branch = resolve_ref("HEAD", head_sha1, 1, NULL);
+       if (!current_branch)
+               die("No current branch");
        if (!strncmp(current_branch, "refs/heads/", 11))
                current_branch += 11;