From: Jakub Narebski Date: Sat, 30 May 2009 10:38:02 GMT Subject: Re: [PATCH] refuse to merge during a merge Message-ID: In-Reply-To: <20090530083721.GA12963@localhost> Clemens Buchacher writes: > On Thu, May 28, 2009 at 05:12:40PM +0100, John Tapsell wrote: > > > +       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