]> git.proxmox.com Git - libgit2.git/commit
diff: check pathspec on non-files
authorEdward Thomson <ethomson@edwardthomson.com>
Sat, 12 Sep 2015 19:32:18 +0000 (15:32 -0400)
committerEdward Thomson <ethomson@edwardthomson.com>
Sat, 12 Sep 2015 19:32:18 +0000 (15:32 -0400)
commit8ab4d0e1e16bf42e4617a40a13d67385fc8fa40c
treed06b61174453c1167615a2c12ac1254d6e90b0c4
parent92f7d32b59642c82c17027bc85a39100869280a7
diff: check pathspec on non-files

When we're not doing pathspec matching, we let the iterator handle
file matching for us.  However, we can only trust the iterator to
return *files* that match the pattern, because the iterator must
return directories that are not strictly in the pathlist, but that
are the parents of files that match the pattern, so that diff can
later recurse into them.

Thus, diff must examine non-files explicitly before including them
in the delta list.
src/diff.c