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>
Michael Haggerty committed
Apr 7, 2016 at 15:03 UTC
17377b62520fc12bd179514c8510d68e25dfb686
1 file changed
+2
-2
builtin/merge.c
+2
-2
@@ -1165,7 +1165,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1165
struct commit *head_commit;
1166
struct strbuf buf = STRBUF_INIT;
1167
const char *head_arg;
1168
- int flag, i, ret = 0, head_subsumed;
1168
+ int i, ret = 0, head_subsumed;
1169
int best_cnt = -1, merge_was_ok = 0, automerge_was_ok = 0;
1170
struct commit_list *common = NULL;
1171
const char *best_strategy = NULL, *wt_strategy = NULL;
@@ -1179,7 +1179,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1179
* Check if we are _not_ on a detached HEAD, i.e. if there is a
1180
* current branch.
1181
*/
1182
- branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, &flag);
1182
+ branch = branch_to_free = resolve_refdup("HEAD", 0, head_sha1, NULL);
1183
if (branch && starts_with(branch, "refs/heads/"))
1184
branch += 11;
1185
if (!branch || is_null_sha1(head_sha1))