git-mailinfo: add --message-id
[gitweb.git] / builtin / show-branch.c
index 46498e111354bf0d86bb04f5207812e7f54259d8..270e39c6c1b0855181a19b12739425035db9ad1d 100644 (file)
@@ -563,7 +563,7 @@ static int git_show_branch_config(const char *var, const char *value, void *cb)
                        default_arg[default_num++] = "show-branch";
                } else if (default_alloc <= default_num + 1) {
                        default_alloc = default_alloc * 3 / 2 + 20;
-                       default_arg = xrealloc(default_arg, sizeof *default_arg * default_alloc);
+                       REALLOC_ARRAY(default_arg, default_alloc);
                }
                default_arg[default_num++] = xstrdup(value);
                default_arg[default_num] = NULL;
@@ -728,7 +728,9 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                if (ac == 0) {
                        static const char *fake_av[2];
 
-                       fake_av[0] = resolve_refdup("HEAD", sha1, 1, NULL);
+                       fake_av[0] = resolve_refdup("HEAD",
+                                                   RESOLVE_REF_READING,
+                                                   sha1, NULL);
                        fake_av[1] = NULL;
                        av = fake_av;
                        ac = 1;
@@ -789,7 +791,8 @@ int cmd_show_branch(int ac, const char **av, const char *prefix)
                }
        }
 
-       head_p = resolve_ref_unsafe("HEAD", head_sha1, 1, NULL);
+       head_p = resolve_ref_unsafe("HEAD", RESOLVE_REF_READING,
+                                   head_sha1, NULL);
        if (head_p) {
                head_len = strlen(head_p);
                memcpy(head, head_p, head_len + 1);