Re: [PATCH] Make git revert warn the user when reverting a merge commit.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 21, 2008, 10:59 UTC
- Message-ID
- <7v8wq9rdyl.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <200812211109.36788.robin.rosenberg.lists@dewire.com>
Robin Rosenberg <robin.rosenberg.lists@dewire.com> writes:
> One could consider keeping the contributions from ^1 a special case and not > mention the parent, making it look like any revert commit. I guess most merge > reverts are like this in practice.
I think that makes sense. There are cases where the mainline maintainer punts a merge and pass the baton to a subsystem maintainer, saying "Your tree has many conflicts with my tip, and I'd rather ask you to resolve it" (and after such a merge, the mainline maintainer will fast forward to the result), in which case the merge will be in the reverse direction, but that should be rare. Reverting such a merge later from the mainline's point of view would involve "revert -m 2".
So if your patch is tightened a bit to record extra information only in such a case, I think that would be an acceptable approach to the issue.