]> granicus.if.org Git - git/commitdiff
cmd_merge(): remove unneeded flag variable
authorMichael Haggerty <mhagger@alum.mit.edu>
Thu, 7 Apr 2016 19:03:06 +0000 (15:03 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Apr 2016 18:35:34 +0000 (11:35 -0700)
It is never read, so we can pass NULL to resolve_ref_unsafe().

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/merge.c

index 101ffeff4c942636e0ca688357a4b8ec8aa2a431..c90ee51c6cfef86bfa28f40b53efb853e163d60d 100644 (file)
@@ -1165,7 +1165,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
        struct commit *head_commit;
        struct strbuf buf = STRBUF_INIT;
        const char *head_arg;
-       int flag, i, ret = 0, head_subsumed;
+       int i, ret = 0, head_subsumed;
        int best_cnt = -1, merge_was_ok = 0, automerge_was_ok = 0;
        struct commit_list *common = NULL;
        const char *best_strategy = NULL, *wt_strategy = NULL;
@@ -1179,7 +1179,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
         * Check if we are _not_ on a detached HEAD, i.e. if there is a
         * current branch.
         */
-       branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, &flag);
+       branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, NULL);
        if (branch && starts_with(branch, "refs/heads/"))
                branch += 11;
        if (!branch || is_null_sha1(head_sha1))