jgit/org.eclipse.jgit
Thomas Wolf 5332723729 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>
2020-07-17 00:50:24 +02:00
..
.settings Decouple JSch from JGit Core 2020-06-01 01:46:59 +02:00
META-INF Prepare 5.9.0-SNAPSHOT builds 2020-06-09 12:51:12 +02:00
findBugs [findBugs] Silence warning about Transport initialization 2012-09-14 00:01:47 +02:00
resources/org/eclipse/jgit Improve error message when receive.maxCommandBytes is exceeded 2020-06-29 08:57:42 +09:00
src/org/eclipse/jgit DiffFormatter: correctly deal with tracked files in ignored folders 2020-07-17 00:50:24 +02:00
.classpath
.fbprefs
.gitignore
.project
BUILD Decouple JSch from JGit Core 2020-06-01 01:46:59 +02:00
about.html SHA-1: collision detection support 2017-02-28 16:38:43 -08:00
build.properties
plugin.properties Fix bundle localization of Apache SSH bundle 2019-06-21 17:54:06 +02:00
pom.xml Prepare 5.9.0-SNAPSHOT builds 2020-06-09 12:51:12 +02:00