Re: Implementing git-am -3 with git-apply -3?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 26, 2015, 03:29 UTC
- Message-ID
- <xmqqsiak819q.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <CACRoPnQWAYPsVVP_ycjBgPVSM_Orx7QmJc96zL5ixRuqi=V_eg@mail.gmail.com>
Paul Tan <pyokagan@gmail.com> writes:
> I wonder if it is possible to implement the 3-way merge in git-am > using git-apply. Are there any issues/deficiencies that I need to be > aware of?
Anything is possible ;-)
Even though I suspect it might be of significant complexity, it certainly would be nice if "apply -3" could be taught to do everything "am -3" would do.
> * git-apply does not handle renames in the index.
True. The patch application does not really have a global picture, and that is one of the reasons why I foresee significant complexity as I said above. The three-way merge with synthesized virtual base tree done in "am -3" makes use of established and independent component that is merge-recursive, and that makes things easier and keeps things cleaner.
> * It could probably try harder at merging submodules (perhaps by using > merge_submodule()?)
I am not sure what you mean. I thought it punts what "am -3" would punt on, and handles what "am -3" would handle.