Thread (2 messages) 2 messages, 2 authors, 2017-10-31
STALE3253d

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

From: Junio C Hamano <hidden>
Date: 2017-10-31 05:23:56
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help