Thread (5 messages) flat view 5 messages, 3 authors, 2016-08-03

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

From: Jakub Narębski <hidden>
Date: 2016-08-03 19:00:03

W dniu 03.08.2016 o 20:02, Jeff King pisze:
On Wed, Aug 03, 2016 at 12:16:14PM +0200, Laszlo Ersek wrote:
quoted
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". 
And I think adding such capability would not be easy.  Well, perhaps
we could support '+=' in addition to '='?
        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.
I wonder if `git var -l` could provide all default values :-P

-- 
Jakub Narębski
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help