summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java5
1 files changed, 4 insertions, 1 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 01fa7eeb81..d2bf9ac187 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
@@ -45,6 +45,7 @@
package org.eclipse.jgit.pgm;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -72,7 +73,7 @@ class LsTree extends TextBuiltin {
/** {@inheritDoc} */
@Override
- protected void run() throws Exception {
+ 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)
@@ -95,6 +96,8 @@ class LsTree extends TextBuiltin {
outw.print(QuotedString.GIT_PATH.quote(walk.getPathString()));
outw.println();
}
+ } catch (IOException e) {
+ throw die(e.getMessage(), e);
}
}
}