[PATCH] Optimize diff-tree -[CM] --stdin
[gitweb.git] / diffcore-pathspec.c
index c460b2e56d3e6fe26f9e78ba3a877dc5417e8590..0392d66a55dc425d113d8969c33ccbe7d3c1497e 100644 (file)
@@ -55,8 +55,7 @@ void diffcore_pathspec(const char **pathspec)
 
        for (i = 0; i < q->nr; i++) {
                struct diff_filepair *p = q->queue[i];
-               if (matches_pathspec(p->one->path, spec, speccnt) ||
-                   matches_pathspec(p->two->path, spec, speccnt))
+               if (matches_pathspec(p->two->path, spec, speccnt))
                        diff_q(&outq, p);
                else
                        diff_free_filepair(p);