Subject: Re: [PATCH 3.5/4] diff: set TEXTCONV_VIA_CMDLINE only when it is set to true

From: Brandon Williams <[email-masked]>
Date: Tue, 31 Oct 2017 10:55:22 -0700

On 10/31, Junio C Hamano wrote:
> Change the meaning of the bit to "the user explicitly set the
> allow-textconv bit to true from the command line".
> 
> The "touched" mechanism in the old code meant to express "the user
> explicitly set the allow-textconv bit to something from the command
> line" and recorded that fact upon "--no-textconv", too, by setting
> the corresponding touched bit.  The code in the previous step to
> clear the bit did not make much sense.
> 
> Again, this may want be squashed into the previous step, but its log
> message needs to be adjusted somewhat (e.g. "s/is requested via/is
> set to true via/").

I don't have any opinions on this, but I agree that if we want a more
true conversion then we would wanted to squash this in, which I'll do
and update the log message.

> 
> Signed-off-by: Junio C Hamano <[email-masked]>
> ---
>  diff.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/diff.c b/diff.c
> index 8b700b1bd2..11fccbd107 100644
> --- a/diff.c
> +++ b/diff.c
> @@ -4765,10 +4765,9 @@ int diff_opt_parse(struct diff_options *options,
>  	else if (!strcmp(arg, "--textconv")) {
>  		DIFF_OPT_SET(options, ALLOW_TEXTCONV);
>  		DIFF_OPT_SET(options, TEXTCONV_SET_VIA_CMDLINE);
> -	} else if (!strcmp(arg, "--no-textconv")) {
> +	} else if (!strcmp(arg, "--no-textconv"))
>  		DIFF_OPT_CLR(options, ALLOW_TEXTCONV);
> -		DIFF_OPT_CLR(options, TEXTCONV_SET_VIA_CMDLINE);
> -	} else if (!strcmp(arg, "--ignore-submodules")) {
> +	else if (!strcmp(arg, "--ignore-submodules")) {
>  		DIFF_OPT_SET(options, OVERRIDE_SUBMODULE_CONFIG);
>  		handle_ignore_submodules_arg(options, "all");
>  	} else if (skip_prefix(arg, "--ignore-submodules=", &arg)) {
> -- 
> 2.15.0-224-g5109123e6a
> 

-- 
Brandon Williams