aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst/org
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-01-15 23:51:43 +0100
committerRobin Rosenberg <robin.rosenberg@dewire.com>2012-01-15 23:56:37 +0100
commit03b5416a35ad78773fb0a97a98686fec18c0c05e (patch)
treee1a15a9a4beb841e5b4f680f9f88d6d85ea8989c /org.eclipse.jgit.test/tst/org
parente875c905d310153165c5bdb24ead55d98596923a (diff)
downloadjgit-03b5416a35ad78773fb0a97a98686fec18c0c05e.tar.gz
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.test/tst/org')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java
index aab3b7ade5..f975a87736 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryResolveTest.java
@@ -218,6 +218,10 @@ public class RepositoryResolveTest extends SampleDataRepositoryTestCase {
assertEquals(b2_txt, db.resolve("b:b/b2.txt"));
assertEquals(b_root, db.resolve("b:"));
+ assertEquals(id("6020a3b8d5d636e549ccbd0c53e2764684bb3125"),
+ db.resolve("master:"));
+ assertEquals(id("10da5895682013006950e7da534b705252b03be6"),
+ db.resolve("master:b/b2.txt"));
assertEquals(master_txt, db.resolve(":master.txt"));
assertEquals(b3_b2_txt, db.resolve("b~3:b/b2.txt"));