summaryrefslogtreecommitdiff
path: root/builtin/merge.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-04-23 20:01:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-04-29 20:17:52 (GMT)
commit00c7e7e7e8a2aa07b2cd3a09c8f9e11872727d86 (patch)
tree27e02b5a2c9139ab6bbe552629313229213c075a /builtin/merge.c
parent9e62316df7f918eabc879f97da76543cc5f0b3fc (diff)
downloadgit-00c7e7e7e8a2aa07b2cd3a09c8f9e11872727d86.zip
git-00c7e7e7e8a2aa07b2cd3a09c8f9e11872727d86.tar.gz
git-00c7e7e7e8a2aa07b2cd3a09c8f9e11872727d86.tar.bz2
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>
Diffstat (limited to 'builtin/merge.c')
-rw-r--r--builtin/merge.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/builtin/merge.c b/builtin/merge.c
index bebbe5b..8477878 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -1165,15 +1165,15 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
option_commit = 0;
}
- if (!abort_current_merge) {
- if (!argc) {
- if (default_to_upstream)
- argc = setup_with_upstream(&argv);
- else
- die(_("No commit specified and merge.defaultToUpstream not set."));
- } else if (argc == 1 && !strcmp(argv[0], "-"))
- argv[0] = "@{-1}";
+ if (!argc) {
+ if (default_to_upstream)
+ argc = setup_with_upstream(&argv);
+ else
+ die(_("No commit specified and merge.defaultToUpstream not set."));
+ } else if (argc == 1 && !strcmp(argv[0], "-")) {
+ argv[0] = "@{-1}";
}
+
if (!argc)
usage_with_options(builtin_merge_usage,
builtin_merge_options);