attr.c: refactoring
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index f884de77ac2a0175e317628e25ec9ee3aaa902f7..97cc5bc085ba21693007328bb402860420949ec0 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -3185,7 +3185,8 @@ static void diffcore_skip_stat_unmatch(struct diff_options *diffopt)
                         * to determine how many paths were dirty only
                         * due to stat info mismatch.
                         */
-                       diffopt->skip_stat_unmatch++;
+                       if (!diffopt->no_index)
+                               diffopt->skip_stat_unmatch++;
                        diff_free_filepair(p);
                }
        }