summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorDave Borowitz <dborowitz@google.com>2014-05-02 15:48:59 -0700
committerDave Borowitz <dborowitz@google.com>2014-05-07 11:41:55 -0700
commitb4abb0d849f7fe82e2265082072253ad805871fe (patch)
tree09e45e7b2292ff0e6b92af988c79398566fe9abd /org.eclipse.jgit.pgm
parent7f394cf16222f4066fe93e495ea682c2348039ca (diff)
downloadjgit-b4abb0d849f7fe82e2265082072253ad805871fe.tar.gz
jgit-b4abb0d849f7fe82e2265082072253ad805871fe.zip
LsTree: quote paths in output
Change-Id: Ic78d5b41e057fcd3282e97ac73ed506666f28f88
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java3
1 files changed, 2 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 e444d21dd9..4b16ed8800 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
@@ -53,6 +53,7 @@ import org.eclipse.jgit.lib.FileMode;
import org.eclipse.jgit.treewalk.AbstractTreeIterator;
import org.eclipse.jgit.treewalk.TreeWalk;
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
+import org.eclipse.jgit.util.QuotedString;
import org.kohsuke.args4j.Argument;
import org.kohsuke.args4j.Option;
import org.kohsuke.args4j.spi.StopOptionHandler;
@@ -90,7 +91,7 @@ class LsTree extends TextBuiltin {
outw.print(walk.getObjectId(0).name());
outw.print('\t');
- outw.print(walk.getPathString());
+ outw.print(QuotedString.GIT_PATH.quote(walk.getPathString()));
outw.println();
}
}