summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.test/tst
diff options
context:
space:
mode:
authorJonathan Tan <jonathantanmy@google.com>2019-10-16 13:33:20 -0400
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2019-10-16 13:33:20 -0400
commit3b96aeb2c96ae3b45103b5ed2eb0357ace70899d (patch)
tree9ff0c23dc8e57d4f55a7b0de203902ee6ae5b415 /org.eclipse.jgit.test/tst
parent51b24ea17c4f08f53af46ab774b0a2d80c37dc2e (diff)
parent218bacdc1f96942701503aa7891707bb3eccc111 (diff)
downloadjgit-3b96aeb2c96ae3b45103b5ed2eb0357ace70899d.tar.gz
jgit-3b96aeb2c96ae3b45103b5ed2eb0357ace70899d.zip
Merge "reftable: fix lookup by ID in merged reftables"
Diffstat (limited to 'org.eclipse.jgit.test/tst')
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java
index c20db7b96b..5f5ab72671 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/MergedReftableTest.java
@@ -187,6 +187,19 @@ public class MergedReftableTest {
}
}
+ @Test
+ public void tableByIDDeletion() throws IOException {
+ List<Ref> delta1 = Arrays.asList(
+ ref("refs/heads/apple", 1),
+ ref("refs/heads/master", 2));
+ List<Ref> delta2 = Arrays.asList(ref("refs/heads/master", 3));
+
+ MergedReftable mr = merge(write(delta1), write(delta2));
+ try (RefCursor rc = mr.byObjectId(id(2))) {
+ assertFalse(rc.next());
+ }
+ }
+
@SuppressWarnings("boxing")
@Test
public void fourTableScan() throws IOException {