Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: commiting while the current version is in conflict

From: Avery Pennarun <hidden>
Date: 2016-06-15 22:45:29

On Thu, Oct 16, 2008 at 7:26 PM, Richard Hartmann
[off-list ref] wrote:
On Fri, Oct 17, 2008 at 01:00, Shawn O. Pearce [off-list ref] wrote:
quoted
and merge conflicts are "resolved" by you running "git add $path"
after you have finished fixing that path.
True, git add is an implicit resolving, I did not think about it this way.
Personally, I think that git should break at this point, but that's
just me.

The obvious fix would be a pre-add hook. Does anyone else think
this would make sense?
That would be awesome.  I've frequently been bitten by accidentally
running "git add" on a file that I *think* I've resolved the conflicts
on, but it turns out I missed a commit marker or two.  And then the
handy conflict-style "git diff" is no longer available, among other
things.  If "git add" could prevent me from adding the file at all, it
might save me some trouble.

On the other hand, an even better alternative would be to have a way
to "unadd" a file and bring back the conflict information, but I don't
know how that would really work.

Have fun,

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