]> source.dussan.org Git - jgit.git/commit
DirCacheIterator: Fix reset() and back() 52/9252/2
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Fri, 14 Dec 2012 23:30:42 +0000 (00:30 +0100)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 15 Dec 2012 10:00:55 +0000 (11:00 +0100)
commitaf54f16635f4d164ca22c0c9b264bc14c2b5ccd0
tree9534da449f8ae51813a430de394caef9ca694973
parent138a2b06c8afb41d848e1b75eff10d57e055a619
DirCacheIterator: Fix reset() and back()

reset() was broken and probably only worked when the position was
at the beginning. More serious was that back() sometimes descended
into the tree rather than skipping backward at the same level. Sometimes
this would result in false conflicts, but one could suspect silent
errors too. back() is called by the NamingConflictTreeWalk when looking
for directory/file conflicts.

Also added toString to DirCacheTree to simplify debugging.

Bug: 396127
Change-Id: Iaa1b4e20e623d84c2e5ac26748f42e991080dbcd
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java