diff --quiet: disable optimization when --diff-filter=X is used
[gitweb.git] / diff-lib.c
index ad2a4cde74e0c2ec6367a7128aa0732f131f6bdf..bfa65033734452faae0d5f4365a817f9e35b3e01 100644 (file)
@@ -73,8 +73,9 @@ int run_diff_files(struct rev_info *revs, unsigned int option)
                struct cache_entry *ce = active_cache[i];
                int changed;
 
-               if (DIFF_OPT_TST(&revs->diffopt, QUIET) &&
-                       DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
+               if (DIFF_OPT_TST(&revs->diffopt, QUICK) &&
+                   !revs->diffopt.filter &&
+                   DIFF_OPT_TST(&revs->diffopt, HAS_CHANGES))
                        break;
 
                if (!ce_path_match(ce, revs->prune_data))
@@ -523,7 +524,7 @@ int index_differs_from(const char *def, int diff_flags)
 
        init_revisions(&rev, NULL);
        setup_revisions(0, NULL, &rev, def);
-       DIFF_OPT_SET(&rev.diffopt, QUIET);
+       DIFF_OPT_SET(&rev.diffopt, QUICK);
        DIFF_OPT_SET(&rev.diffopt, EXIT_WITH_STATUS);
        rev.diffopt.flags |= diff_flags;
        run_diff_index(&rev, 1);