From: Jeff King Date: Tue, 12 Jul 2011 00:03:04 GMT Subject: Re: [PATCH 2/5] add object-cache infrastructure Message-ID: <20110712000304.GA32276@sigill.intra.peff.net> In-Reply-To: <7vk4bo9ze5.fsf@alter.siamese.dyndns.org> On Mon, Jul 11, 2011 at 04:21:54PM -0700, Junio C Hamano wrote: > Actually I do not think identifying the ones that can safely skipped is > such a big issue. The case I am most concerned about is when you see that > "two reverted back to one" (which you obviously want to avoid, to keep the > effect of the commit the upstream has to have "two" on that line), but at > the same time when you do not agree with the change that the upstream took > for the _current commit_ you are replaying (i.e. you want the final result > to have "one", not "modified one" which the upstream has applied). I'm not sure there's a general solution to that. You can't keep the commit you want intact, because you are rebasing and therefore building on top of the other broken commit. So in a history like: B'--C' / A--B--C You really want to perform the transformation of B to B', but on top of C (i.e., "git checkout C; git diff B' B | git apply"). But if B and C are textually related, it's going to conflict horribly. And I don't think there is a general solution short of a darcs-style patch algebra. -Peff