Re: [PATCH] grep: allow -E and -n to be turned on by default via configuration

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

 



On Mon, Mar 28, 2011 at 5:12 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> +grep.lineNumbers::
> + Â Â Â If set to true, enable '-n' option by default.
> +
> +grep.extendedRegexp::
> + Â Â Â If set to true, enable '--extended-regexp' option by default.
> +

I know my original patch was plural, but I since noticed that the GNU
grep --line-number option is singular.  I used the same thing in my
patch to add that option to git grep.  Should this one be singular?


> +grep.lineNumbers::
> + Â Â Â If set to true, enable '-n' option by default.
> +
> +grep.extendedRegexp::
> + Â Â Â If set to true, enable '--extended-regexp' option by default.
> +
> +
...
> + Â Â Â if (!strcmp(var, "grep.extendedregexp")) {
> + Â Â Â Â Â Â Â opt->regflags |= git_config_bool(var, value) ? REG_EXTENDED : 0;
> + Â Â Â Â Â Â Â return 0;
> + Â Â Â }
> +
> + Â Â Â if (!strcmp(var, "grep.linenumbers")) {
> + Â Â Â Â Â Â Â opt->linenum = git_config_bool(var, value);

We need to match the case between the docs and the code or use
strcasecmp().  Most config options I could find used all lower-case.



Joe
--
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]