Skip to content

Commit 00c7e7e

Browse files
committed
merge: simplify code flow
One of the first things cmd_merge() does is to see if the "--abort" option is given and run "reset --merge" and exit. When the control reaches this point, we know "--abort" was not given. Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9e62316 commit 00c7e7e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

builtin/merge.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,15 +1165,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
11651165
option_commit = 0;
11661166
}
11671167

1168-
if (!abort_current_merge) {
1169-
if (!argc) {
1170-
if (default_to_upstream)
1171-
argc = setup_with_upstream(&argv);
1172-
else
1173-
die(_("No commit specified and merge.defaultToUpstream not set."));
1174-
} else if (argc == 1 && !strcmp(argv[0], "-"))
1175-
argv[0] = "@{-1}";
1168+
if (!argc) {
1169+
if (default_to_upstream)
1170+
argc = setup_with_upstream(&argv);
1171+
else
1172+
die(_("No commit specified and merge.defaultToUpstream not set."));
1173+
} else if (argc == 1 && !strcmp(argv[0], "-")) {
1174+
argv[0] = "@{-1}";
11761175
}
1176+
11771177
if (!argc)
11781178
usage_with_options(builtin_merge_usage,
11791179
builtin_merge_options);

0 commit comments

Comments
 (0)