Skip to content

Commit

Permalink
[PATCH] Make pathspec only care about the detination tree.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Junio C Hamano authored and Linus Torvalds committed May 29, 2005
1 parent 226406f commit 847941f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions diffcore-pathspec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 847941f

Please sign in to comment.