summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--diffcore-pathspec.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diffcore-pathspec.c b/diffcore-pathspec.c
index c460b2e56d..0392d66a55 100644
--- a/diffcore-pathspec.c
+++ b/diffcore-pathspec.c
@@ -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);