Re: Custom merge drivers: accessing the pathnames and revisions of the files being merged
- From
Antonin Delpeuch <antonin@delpeuch.eu>
- Date
- Jan 16, 2024, 21:59 UTC
- Message-ID
- <4e6dddd1-2149-403b-82ed-b822c4b0c31e@delpeuch.eu>
- In-Reply-To
- <xmqqedeh1816.fsf@gitster.g>
Thanks a lot for your insights! Yes I also very much appreciate that the extension point is built in such a way that introducing new parameters is non-breaking.
On 16/01/2024 18:51, Junio C Hamano wrote:
Show 7 quoted lines
> * Whatever letters we choose, they must have mnemonic value that > signals two of them are the both sides of the merge that are > equal participants, and the other one is the old-file, their > common ancestor that plays quite a different from these two in > the merge. I cannot tell which one of the XYZ would be the more > special than other two, which is the primary reason why I do not > know if XYZ is a good idea.
That makes perfect sense. How about:
- %S for the "source" pathname (corresponding to the %O file)
- %X for the first side of the merge (corresponding to the %A file)
- %Y for the second side of the merge (corresponding to the %B file)
Anyway, I'll try to work on a patch: it should be easy to adapt the letters to any other choice.
Best,
Antonin