X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin-merge.c;h=793f2f4a189e448fb481c5c1e2886be28fddf2e2;hb=08ba24898a1c5c0815450d481d8e5d01bf671642;hp=0b58e5eda1f38c1560cc9dcf69be37fa5fc9886f;hpb=2c8f8b19d4f293edd78885880ed1a6166395ffdd;p=git.git diff --git a/builtin-merge.c b/builtin-merge.c index 0b58e5eda..793f2f4a1 100644 --- a/builtin-merge.c +++ b/builtin-merge.c @@ -462,7 +462,7 @@ static int git_merge_config(const char *k, const char *v, void *cb) argv = xrealloc(argv, sizeof(*argv) * (argc + 2)); memmove(argv + 1, argv, sizeof(*argv) * (argc + 1)); argc++; - parse_options(argc, argv, builtin_merge_options, + parse_options(argc, argv, NULL, builtin_merge_options, builtin_merge_usage, 0); free(buf); } @@ -836,8 +836,11 @@ int cmd_merge(int argc, const char **argv, const char *prefix) struct commit_list **remotes = &remoteheads; setup_work_tree(); + if (file_exists(git_path("MERGE_HEAD"))) + die("You have not concluded your merge. (MERGE_HEAD exists)"); if (read_cache_unmerged()) - die("You are in the middle of a conflicted merge."); + die("You are in the middle of a conflicted merge." + " (index unmerged)"); /* * Check if we are _not_ on a detached HEAD, i.e. if there is a @@ -855,7 +858,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix) if (diff_use_color_default == -1) diff_use_color_default = git_use_color_default; - argc = parse_options(argc, argv, builtin_merge_options, + argc = parse_options(argc, argv, prefix, builtin_merge_options, builtin_merge_usage, 0); if (verbosity < 0) show_diffstat = 0;