From: Junio C Hamano <gitster@pobox.com>
To: Antonin Delpeuch <antonin@delpeuch.eu>
Cc: git@vger.kernel.org
Subject: Re: Custom merge drivers: accessing the pathnames and revisions of the files being merged
Date: Tue, 16 Jan 2024 09:51:17 -0800 [thread overview]
Message-ID: <xmqqedeh1816.fsf@gitster.g> (raw)
In-Reply-To: <8bb5e41e-4db9-4527-8492-3aca6a0f40bf@delpeuch.eu> (Antonin Delpeuch's message of "Tue, 16 Jan 2024 09:44:02 +0100")
Antonin Delpeuch <antonin@delpeuch.eu> writes:
> So, I wonder: would people be open to exposing additional parameters
> to merge drivers? For instance we could add parameters "%X", "%Y" "%Z"
> to expose those "revision:pathname" strings for each part. (I think
> colons cannot be part of revision names, so this can be parsed
> unambiguously by the custom merge driver to recover the revision and
> pathname independently, if needed.)
The last time this changed was in ef45bb1f (ll-merge: pass the
original path to external drivers, 2015-06-04).
I may not necessarily endorse the choice of XYZ [*], but I do not
fundamentally oppose to such a new feature existing. The mechanism
to define a custom merge driver is designed to be future-proof in
that only the parameters it uses is given as the value of
merge.*.driver variable, so it is not a problem that existing merge
drivers will not know what to do with "pathname in the common
ancestor", "pathname on our side", and "pathname on their side".
[Footnote]
* 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.
next prev parent reply other threads:[~2024-01-16 17:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 8:44 Custom merge drivers: accessing the pathnames and revisions of the files being merged Antonin Delpeuch
2024-01-16 17:51 ` Junio C Hamano [this message]
2024-01-16 21:59 ` Antonin Delpeuch
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqedeh1816.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=antonin@delpeuch.eu \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).