Re: [PATCH] Add grep.fullName config variable

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

 



Andreas Schwab <schwab@xxxxxxxxxxxxxx> writes:

> This configuration variable sets the default for the --full-name option.
>
> Signed-off-by: Andreas Schwab <schwab@xxxxxxxxxxxxxx>
> ---

Would this change break Porcelains (e.g. Emacs modes) and force them
to be updated to explicitly pass --no-full-name to unbreak them?

>  Documentation/git-grep.txt | 3 +++
>  grep.c                     | 5 +++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/Documentation/git-grep.txt b/Documentation/git-grep.txt
> index f837334..31811f1 100644
> --- a/Documentation/git-grep.txt
> +++ b/Documentation/git-grep.txt
> @@ -53,6 +53,9 @@ grep.extendedRegexp::
>  	option is ignored when the 'grep.patternType' option is set to a value
>  	other than 'default'.
>  
> +grep.fullName::
> +	If set to true, enable '--full-name' option by default.
> +
>  
>  OPTIONS
>  -------
> diff --git a/grep.c b/grep.c
> index c668034..ece04bf 100644
> --- a/grep.c
> +++ b/grep.c
> @@ -86,6 +86,11 @@ int grep_config(const char *var, const char *value, void *cb)
>  		return 0;
>  	}
>  
> +	if (!strcmp(var, "grep.fullname")) {
> +		opt->relative = !git_config_bool(var, value);
> +		return 0;
> +	}
> +
>  	if (!strcmp(var, "color.grep"))
>  		opt->color = git_config_colorbool(var, value);
>  	else if (!strcmp(var, "color.grep.context"))
> -- 
> 1.9.0
--
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]