From: Junio C Hamano Date: Sat, 13 Jun 2009 19:50:22 +0000 (-0700) Subject: Merge branch 'cb/maint-no-double-merge' X-Git-Tag: v1.6.4-rc0~64 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0a17b2cd7ebc0beeab6121d96ce812f22994cc39?ds=inline;hp=-c Merge branch 'cb/maint-no-double-merge' * cb/maint-no-double-merge: refuse to merge during a merge --- 0a17b2cd7ebc0beeab6121d96ce812f22994cc39 diff --combined builtin-merge.c index 8d101eff0b,9e9bd526c3..793f2f4a18 --- a/builtin-merge.c +++ b/builtin-merge.c @@@ -462,7 -462,7 +462,7 @@@ static int git_merge_config(const char 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 +836,11 @@@ int cmd_merge(int argc, const char **ar 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 +858,7 @@@ 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;