Re: [RFC/PATCH 00/18] Add --index-only option to git merge
- From
Michael J Gruber <git@drmicha.warpmail.net>
- Date
- Apr 8, 2016, 13:01 UTC
- Message-ID
- <5707ABBF.2050701@drmicha.warpmail.net>
- In-Reply-To
- <1460098726-5958-1-git-send-email-newren@gmail.com>
Elijah Newren venit, vidit, dixit 08.04.2016 08:58:
Show 17 quoted lines
> This patch series adds an --index-only flag to git merge, the idea > being to allow a merge to be performed entirely in the index without > touching (or even needing) a working tree. > > The core fix, to merge-recursive, was actually quite easy. The > recursive merge logic already had the ability to ignore the working > directory and operate entirely on the index -- it needed to do this > when creating a virtual merge base, i.e. when o->call_depth > 0. It's > just that o->call_depth was also used for other purposes, so I just > needed to introduce a new flag to disambiguate and switch all the > necessary index-only-related call sites to use it. It actually seems > to make the code slightly easier to read too, which is a nice bonus. > That was all done in patch 12 of this series. > > Adding all the necessary testcases and switching over the other merge > strategies turned out to be the harder part...and still has a problem, > as I'll mention below.
I haven't looked at your series thoroughly but immediately had to think of 'tr/remerge-diff' (on 'pu'), see http://permalink.gmane.org/gmane.comp.version-control.git/256591
There, Thomas used index-only merge to reproduce an automatic merge as the base for a useful "remerge-diff".
I've been rebasing (and using) that series on 'next' for a while now without any problems; some reasons kept it from being merged on next, see the thread.
So, it would be interesting whether you solve the same problem differently, or face the same problems ;)
Michael