Subject: Re: [PATCH] refuse to merge during a merge

From: Thomas Rast <[email-masked]>
Date: Sat, 30 May 2009 12:57:23 +0200

Jakub Narebski wrote:
> Clemens Buchacher <[email-masked]> writes:
> > 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?

That doesn't deal with conflicts at all.  It fills the rather
different case where you did a clean merge with some uncommitted
changes in the worktree, but then want to discard the merge again
without losing the uncommitted changes.  In absence of the changes,
you would just use --hard, but here you want to move the branch tip
while merging them over, similar to what 'git checkout -m' does for
moving HEAD.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch