Re: [PATCH] refuse to merge during a merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clemens Buchacher <drizzd@xxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]