diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2020-07-11 15:29:04 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2020-07-17 00:50:24 +0200 |
commit | 533272372945e0e5ddbab1502f185c5afd582f19 (patch) | |
tree | 5c48124706d65e3bb010b6168826faa6e6cc3b90 /.bazelrc | |
parent | 6206a50a46e775df90afad7292d0d264df69bf01 (diff) | |
download | jgit-533272372945e0e5ddbab1502f185c5afd582f19.tar.gz jgit-533272372945e0e5ddbab1502f185c5afd582f19.zip |
DiffFormatter: correctly deal with tracked files in ignored folders
In JGit 5.0, the FileTreeIterator was changed to skip ignored folders
by default. To catch tracked files inside ignored folders, the tree
walk needs to have a DirCacheIterator, and the FileTreeIterator has
to know about that DirCacheIterator via setDirCacheIterator(). (Or
the optimization has to be switched off explicitly via
setWalkIgnoredDirectories(true).)
Skipping ignored directories is an important optimization in some
cases, for instance in node.js/npm projects, where we'd otherwise
traverse the whole huge and deep hierarchy of the typically ignored
node_modules folder.
While all uses of WorkingTreeIterator in JGit had been adapted,
DiffFormatter was forgotten. To make it work correctly (again) also
for such cases, make it set up a WorkingTreeeIterator automatically,
and make sure the WorkingTreeSource can find such files, too. Also
pass the repository to the TreeWalks used inside the DiffFormatter
to pick up the correct attributes, filters, and line-ending settings.
Bug: 565081
Change-Id: Ie88ac81166dc396ba28b83313964c1712b6ca199
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to '.bazelrc')
0 files changed, 0 insertions, 0 deletions