git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Jakub Narębski" <jnareb@gmail.com>
To: Jeff King <peff@peff.net>, Laszlo Ersek <lersek@redhat.com>
Cc: public git mailing list <git@vger.kernel.org>
Subject: Re: appending a pattern to the default "diff.cpp.xfuncname"
Date: Wed, 3 Aug 2016 20:34:28 +0200	[thread overview]
Message-ID: <8c4e96b9-165f-5168-d220-6a1548ff83c7@gmail.com> (raw)
In-Reply-To: <20160803180213.o7xpm4c4tw5rixmy@sigill.intra.peff.net>

W dniu 03.08.2016 o 20:02, Jeff King pisze:
> On Wed, Aug 03, 2016 at 12:16:14PM +0200, Laszlo Ersek wrote:
> 
>> 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


  parent reply	other threads:[~2016-08-03 19:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03 10:16 appending a pattern to the default "diff.cpp.xfuncname" Laszlo Ersek
2016-08-03 18:02 ` Jeff King
2016-08-03 18:12   ` Laszlo Ersek
2016-08-03 18:34   ` Jakub Narębski [this message]
2016-08-03 18:40     ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8c4e96b9-165f-5168-d220-6a1548ff83c7@gmail.com \
    --to=jnareb@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=lersek@redhat.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).