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/").

Signed-off-by: Junio C Hamano <[email protected]>
---
 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

Reply via email to