Re: What's cooking in git.git (Jan 2025, #06; Wed, 22)
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 2, 2025, 23:33 UTC
- Message-ID
- <xmqqwme73ost.fsf@gitster.g>
- In-Reply-To
- <20250131233452.GB3544301@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> Nice way to use extended context to show why the change makes sense. > > I've been tempted to support a: > > Diff-options: -U10 > > trailer, but that is probably overkill and full of annoying corner > cases.
Do you mean to embed it in the commit log trailer and upon seeing it, the log family of commands add it to their setup_revisions() invocation, thusly affecting things like "format-patch" and "show"?
As a reminder for a patch submitter (i.e., communicated by you who wrote the commit to future you who will run format-patch for submission), something locally maintained might be sufficient, e.g. refs/notes/diffopts that is not shared by default, but still, this hint probably wants to be per-path (ideally per-hunk).
But I think it will make it annoying if you forced those who fetched from you to use "-U10" when they do "git show", as the choice would be strongly affected by personal preference. And I certainly do not want to see anything less benign than "-U10" silently forced upon me.
Thanks.