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 <gitster@pobox.com>
Junio C Hamano committed
Apr 23, 2015 at 13:01 UTC
00c7e7e7e8a2aa07b2cd3a09c8f9e11872727d86
1 file changed
+8
-8
builtin/merge.c
+8
-8
@@ -1165,15 +1165,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
1165
option_commit = 0;
1166
}
1167
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}";
1175
}
1176
+
1177
if (!argc)
1178
usage_with_options(builtin_merge_usage,
1179
builtin_merge_options);