aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorMinh Thai <mthai@google.com>2018-07-10 12:41:23 -0700
committerJonathan Nieder <jrn@google.com>2018-07-10 19:40:29 -0400
commite04d96e3fa27988af8709966fd01ce74e6d481e9 (patch)
tree795cb042ca998d7912a477d964aa6b72e8d1c3c0 /org.eclipse.jgit.pgm
parent04b9f44367f578f66129ec58f09a448041feedc4 (diff)
downloadjgit-e04d96e3fa27988af8709966fd01ce74e6d481e9.tar.gz
jgit-e04d96e3fa27988af8709966fd01ce74e6d481e9.zip
Seek references by prefix in reftable
Reftable implementation of RefDatabase.getRefsByPrefix() should be more performant, as references are filtered directly by prefix; instead of fetching the whole subtree then filter by prefix. Change-Id: If4f5f8c08285ea1eaec9efb83c3d864cea7a1321 Signed-off-by: Minh Thai <mthai@google.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
index fda19017d2..cebb1c449f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java
@@ -70,7 +70,7 @@ class ReadReftable extends TextBuiltin {
BlockSource src = BlockSource.from(in);
ReftableReader reader = new ReftableReader(src)) {
try (RefCursor rc = ref != null
- ? reader.seekRef(ref)
+ ? reader.seekPrefix(ref)
: reader.allRefs()) {
while (rc.next()) {
write(rc.getRef());