Skip to content

Commit 847941f

Browse files
Junio C HamanoLinus Torvalds
authored andcommitted
[PATCH] Make pathspec only care about the detination tree.
Earlier it had a misguided attempt to include paths that matches either source tree or destination tree after the rename/copy detection. The new semantics will be that pathspec defines a narrowed down world the diffcore operates in, so it should not even look at where in the source tree the path came from. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 226406f commit 847941f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

diffcore-pathspec.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ void diffcore_pathspec(const char **pathspec)
5555

5656
for (i = 0; i < q->nr; i++) {
5757
struct diff_filepair *p = q->queue[i];
58-
if (matches_pathspec(p->one->path, spec, speccnt) ||
59-
matches_pathspec(p->two->path, spec, speccnt))
58+
if (matches_pathspec(p->two->path, spec, speccnt))
6059
diff_q(&outq, p);
6160
else
6261
diff_free_filepair(p);

0 commit comments

Comments
 (0)