Thread (9 messages) 9 messages, 5 authors, 2016-06-15

Re: [PATCH] refuse to merge during a merge

From: Thomas Rast <hidden>
Date: 2016-06-15 22:46:52

Jakub Narebski wrote:
Clemens Buchacher [off-list ref] writes:
quoted
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

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help