Skip to content

Commit 17377b6

Browse files
mhaggergitster
authored andcommitted
cmd_merge(): remove unneeded flag variable
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>
1 parent 95ae2c7 commit 17377b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

builtin/merge.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
11651165
struct commit *head_commit;
11661166
struct strbuf buf = STRBUF_INIT;
11671167
const char *head_arg;
1168-
int flag, i, ret = 0, head_subsumed;
1168+
int i, ret = 0, head_subsumed;
11691169
int best_cnt = -1, merge_was_ok = 0, automerge_was_ok = 0;
11701170
struct commit_list *common = NULL;
11711171
const char *best_strategy = NULL, *wt_strategy = NULL;
@@ -1179,7 +1179,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
11791179
* Check if we are _not_ on a detached HEAD, i.e. if there is a
11801180
* current branch.
11811181
*/
1182-
branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, &flag);
1182+
branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, NULL);
11831183
if (branch && starts_with(branch, "refs/heads/"))
11841184
branch += 11;
11851185
if (!branch || is_null_sha1(head_sha1))

0 commit comments

Comments
 (0)