git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Enhancing --show-function and --function-context in default configurations

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 2, 2021, 17:06 UTC
Message-ID
<xmqqmtpzwzbm.fsf@gitster.g>
In-Reply-To
<YQgahVPT8g0+U1B3@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 18 quoted lines
> On Mon, Aug 02, 2021 at 10:45:25AM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> I would like to see us have a setting to turn these on by default, but
>> think it would be better to make that a diff.* config setting to put
>> into ~/.gitconfig, i.e. we'd extend git itself to know about a list of
>> extensions for the given userdiff drivers, and use them when rendering
>> diffs.
>
> A long time ago we discussed doing this. The relevant thread is:
>
>   https://lore.kernel.org/git/20111216110000.GA15676@sigill.intra.peff.net/
>
> which references a few others:
>
>   https://lore.kernel.org/git/4E569F10.8060808@panasas.com/
>
>   https://lore.kernel.org/git/4E6E928A.6080003@sunshineco.com/
> ...
Thanks for pointers.

One good suggestion given there was to use diff=c and diff=perl in our own .gitattributes to use the patterns ourselves, which we seem to have been doing just fine ;-)

As long as the default built-in ones are
 (1) at least 90% of the time improvement over, or at least is not
     broken compared to, the unconfigured case, and
 (2) at the lowest priority that users can easily countermand for
     the rest 10% cases

I do not think it is too bad to resurrect the old patches from these threads.

Thanks.
Previous: Jeff KingNext: heapcrash heapcrash
Message 5 of 7 in “Enhancing --show-function and --function-context in default configurations”
  1. heapcrash heapcrashAug 1, 2021
  2. Junio C HamanoAug 2, 2021
  3. Ævar Arnfjörð BjarmasonAug 2, 2021
  4. Jeff KingAug 2, 2021
  5. Junio C HamanoAug 2, 2021
  6. heapcrash heapcrashAug 3, 2021
  7. Jeff KingAug 3, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.