All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Braun <thomas.braun@virtuell-zuhause.de>
Cc: GIT Mailing-list <git@vger.kernel.org>
Subject: Re: Custom hunk-header with ignore case setting
Date: Wed, 15 Oct 2014 12:35:56 -0700	[thread overview]
Message-ID: <xmqqd29tw2g3.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <543E6E23.5030708@virtuell-zuhause.de> (Thomas Braun's message of "Wed, 15 Oct 2014 14:52:51 +0200")

Thomas Braun <thomas.braun@virtuell-zuhause.de> writes:

> I've seen that the builtin diff patterns in userdiff.c can be
> specified ignoring case using the IPATTERN macro.
>
> One of the possible solutions would be to patch userdiff.c
> (patch courtesy of Johannes Schindelin):
>
> -- snip --
> diff --git a/userdiff.c b/userdiff.c
> index fad52d6..f089e50 100644
> --- a/userdiff.c
> +++ b/userdiff.c
> @@ -228,6 +228,9 @@ int userdiff_config(const char *k, const char *v)
>  		return parse_funcname(&drv->funcname, k, v, 0);
>  	if (!strcmp(type, "xfuncname"))
>  		return parse_funcname(&drv->funcname, k, v, REG_EXTENDED);
> +	if (!strcmp(type, "ixfuncname"))
> +		return parse_funcname(&drv->funcname, k, v,
> +				REG_EXTENDED | REG_ICASE);
>  	if (!strcmp(type, "binary"))
>  		return parse_tristate(&drv->binary, k, v);
>  	if (!strcmp(type, "command"))

I am not sure if we care deeply about supporting case insensitive
payload in the first place, but the above change, unlike other
possibilities, adds only small burden to the end users' cognitive
load, and it looks like a sensible way to go forward.

Thanks.

      reply	other threads:[~2014-10-15 19:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15 12:52 Custom hunk-header with ignore case setting Thomas Braun
2014-10-15 19:35 ` Junio C Hamano [this message]

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

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

  git send-email \
    --in-reply-to=xmqqd29tw2g3.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=thomas.braun@virtuell-zuhause.de \
    /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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.