]> source.dussan.org Git - jgit.git/commitdiff
AbstractTreeIterator: Add toString with entry path 22/8322/1
authorRobin Stocker <robin@nibor.org>
Sat, 20 Oct 2012 18:11:34 +0000 (20:11 +0200)
committerRobin Stocker <robin@nibor.org>
Sat, 20 Oct 2012 18:12:25 +0000 (20:12 +0200)
Helps when debugging tree walking code.

Change-Id: I7ba3846a028a1538787a7d4fbf50f7c487cae6c7

org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java

index 752f20bf3874512654be57b7bfe37f66076d666c..0b8df130f8b6a17347dea04d8889dda9deca8885 100644 (file)
@@ -671,4 +671,9 @@ public abstract class AbstractTreeIterator {
        public void getName(byte[] buffer, int offset) {
                System.arraycopy(path, pathOffset, buffer, offset, pathLen - pathOffset);
        }
+
+       @Override
+       public String toString() {
+               return getClass().getSimpleName() + "[" + getEntryPathString() + "]";
+       }
 }