Re: [PATCH] refuse to merge during a merge
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:46:52
Clemens Buchacher [off-list ref] writes:
On Thu, May 28, 2009 at 05:12:40PM +0100, John Tapsell wrote:quoted
quoted
+ if (read_cache_unmerged() || file_exists(git_path("MERGE_HEAD"))) die("You are in the middle of a conflicted merge.");Could the error message also give possible solutions? "Commit the current merge first with 'git commit', or discard the current merge attempt with 'git reset --hard'" or something. Or at least a pointer to where to read for more info.How about this. fatal: You are in the middle of a [conflicted] merge. To complete the merge [resolve conflicts and] commit the changes. To abort, use "git reset HEAD". The part about resolving changes is only displayed if there are unmerged entries. I intentionally left out --hard, because it potentially removes changes unrelated to the merge (if the work tree was dirty prior to the merge). The user will find out how to reset the work tree by reading the docs.
Why not advertise new "git reset --merge HEAD" then? -- Jakub Narebski Poland ShadeHawk on #git