Re: Question on textconv

Jeff King <[email protected]> Thu, 6 Aug 2026 00:10:52 -0400
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
On Wed, Aug 05, 2026 at 10:05:52AM -0400, [email protected] wrote:

> Could we extend textconv to support %f (the original path) if specified in the
> textconv configuration? That would solve the ambiguity of what is being supplied.

In theory, yes. But there is one gotcha: there's a system for caching
textconv output in git-notes, and it uses only the original blob id as
the cache key.

So I'm not opposed to adding something like %f, as long as the patch to
do so handles the caching problem (even if it just refuses to cache,
that would be much better than returning possibly-wrong results).

That said, it sounds like you just want %f to work around a bug where
the content is not provided. Probably fixing the bug is a better path
forward. Looking at the working tree file to get the contents will not
always be correct (e.g., if you're diffing an old tree).

-Peff