[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>
This commit is contained in:
Junio C Hamano 2005-05-27 15:51:52 -07:00 коммит произвёл Linus Torvalds
Родитель 226406f693
Коммит 847941fdd9
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -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);