Re: Custom hunk-header with ignore case setting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Braun <thomas.braun@xxxxxxxxxxxxxxxxxxx> 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.




--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]