diff options
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java index d2bf9ac187..2a2bb7cc91 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java @@ -76,15 +76,17 @@ class LsTree extends TextBuiltin { protected void run() { try (TreeWalk walk = new TreeWalk(db)) { walk.reset(); // drop the first empty tree, which we do not need here - if (paths.size() > 0) + if (paths.size() > 0) { walk.setFilter(PathFilterGroup.createFromStrings(paths)); + } walk.setRecursive(recursive); walk.addTree(tree); while (walk.next()) { final FileMode mode = walk.getFileMode(0); - if (mode == FileMode.TREE) + if (mode == FileMode.TREE) { outw.print('0'); + } outw.print(mode); outw.print(' '); outw.print(Constants.typeString(mode.getObjectType())); |