diff: add flag to indicate textconv was set via cmdline
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index 3ad9c9b31c7980d0432e003d784b295762105773..11fccbd107a7f6ec9a709ced3d619402b971461f 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -4762,9 +4762,10 @@ int diff_opt_parse(struct diff_options *options,
                DIFF_OPT_SET(options, ALLOW_EXTERNAL);
        else if (!strcmp(arg, "--no-ext-diff"))
                DIFF_OPT_CLR(options, ALLOW_EXTERNAL);
-       else if (!strcmp(arg, "--textconv"))
+       else if (!strcmp(arg, "--textconv")) {
                DIFF_OPT_SET(options, ALLOW_TEXTCONV);
-       else if (!strcmp(arg, "--no-textconv"))
+               DIFF_OPT_SET(options, TEXTCONV_SET_VIA_CMDLINE);
+       } else if (!strcmp(arg, "--no-textconv"))
                DIFF_OPT_CLR(options, ALLOW_TEXTCONV);
        else if (!strcmp(arg, "--ignore-submodules")) {
                DIFF_OPT_SET(options, OVERRIDE_SUBMODULE_CONFIG);