Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg2012-01-15 22:51:43 +0000
committerRobin Rosenberg2012-01-15 22:56:37 +0000
commit03b5416a35ad78773fb0a97a98686fec18c0c05e (patch)
treee1a15a9a4beb841e5b4f680f9f88d6d85ea8989c /org.eclipse.jgit
parente875c905d310153165c5bdb24ead55d98596923a (diff)
downloadjgit-03b5416a35ad78773fb0a97a98686fec18c0c05e.tar.gz
jgit-03b5416a35ad78773fb0a97a98686fec18c0c05e.tar.xz
jgit-03b5416a35ad78773fb0a97a98686fec18c0c05e.zip
Fix resolution of tree when path is empty
Revision strings that end with a ':' with no trailing path should return the tree associated with the current ref parsed Bug: 368370 Change-Id: I7c7617a77bd418bad4e570be2d1e9002ad280762 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 33607ccbd9..bff4270af8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -560,7 +560,7 @@ public abstract class Repository {
tree = rw.parseTree(ref);
}
- if (i == rev.length - i)
+ if (i == rev.length - 1)
return tree.copy();
TreeWalk tw = TreeWalk.forPath(rw.getObjectReader(),

Back to the top