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

Re: appending a pattern to the default "diff.cpp.xfuncname"

From
Jeff King <peff@peff.net>
Date
Aug 3, 2016, 18:02 UTC
Message-ID
<20160803180213.o7xpm4c4tw5rixmy@sigill.intra.peff.net>
In-Reply-To
<40ceebb8-b343-a5ca-e7ff-23cccc181528@redhat.com>
On Wed, Aug 03, 2016 at 12:16:14PM +0200, Laszlo Ersek wrote:
Show 7 quoted lines
> I've used diff.<TYPE>.xfuncname with great success for file <TYPE>s that
> I defined myself. However, now I would like to append an extra pattern
> to the TYPE=cpp case (for which git has builtin patterns). Is there an
> easy way to do this?
> 
> I figured I could open-code the builtin patterns from "userdiff.c", and
> then append my new pattern to those, but it looks kinda gross :)

Unfortunately, no, the config system has no notion of "append to this value". So you are stuck with extracting the builtin value (which annoyingly, you cannot even get without looking at the source code!), and repeating it in your config file.

-Peff
Previous: Laszlo ErsekNext: Laszlo Ersek
Message 2 of 5 in “appending a pattern to the default "diff.cpp.xfuncname"”
  1. Laszlo ErsekAug 3, 2016
  2. Jeff KingAug 3, 2016
  3. Laszlo ErsekAug 3, 2016
  4. Jakub NarębskiAug 3, 2016
  5. Jeff KingAug 3, 2016

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.