Re: Odd merge behaviour involving reverts

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

 




On Thu, 18 Dec 2008, Alan wrote:
> 
> I think I know how to fix it.  I am just concerned about having it occur
> again if someone else makes the same mistake I did.

I suspect we should warn about reverting merges. I'm surprised we don't 
already. Reverting a merge isn't "wrong", but it's a whole lot more subtle 
than reverting a regular commit.

Reverting a regular commit just effectively undoes what that commit did, 
and is fairly straightforward. But reverting a merge commit also undoes 
the _data_ that the commit changed, but it does absolutely nothing to the 
effects on _history_ that the merge had.

So the merge will still exist, and it will still be seen as joining the 
two branches together, and future merges will see that merge as the last 
shared state - and the revert that reverted the merge brought in will not 
affect that at all.

So a "revert" undoes the data changes, but it's very much _not_ an "undo" 
in the sense that it doesn't undo the effects of a commit on the 
repository history.

So if you think of "revert" as "undo", then you're going to always miss 
this part of reverts. Yes, it undoes the data, but no, it doesn't undo 
history.

			Linus
--
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]

  Powered by Linux