]> source.dussan.org Git - jgit.git/commit
Fix TreeWalk to reset attributes cache for each entry 57/75857/1
authorChristian Halstrick <christian.halstrick@sap.com>
Thu, 23 Jun 2016 15:08:45 +0000 (17:08 +0200)
committerChristian Halstrick <christian.halstrick@sap.com>
Thu, 23 Jun 2016 15:11:47 +0000 (17:11 +0200)
commite7df61ef4dc3991d1b218e70ec2095e8c10e97ce
tree48bdcfc8d3efb53cc927e003a575711dac8e81e7
parent5fe44ed3ee025404dc34966ec996641f47f8490b
Fix TreeWalk to reset attributes cache for each entry

Treewalk has a member 'attr' which caches the attributes for the current
entry. We did not reset the cache always when moving to next entry. The
effect was that when there are no attributes for an entry 'a' but 'a'
was skipped by a Treewalk filter then Treewalk stopped looking for
attributes until TreeWalk.next() was called again.

Change-Id: Ied39b7fb5f56afe7a237da17801003d0abe6b1c7
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java