diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-04-27 10:42:53 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-04-27 11:16:10 +0900 |
commit | 4dcf2f93db3f31262220140484237cfbb4189f4d (patch) | |
tree | 4cf0ac9a340ad12eda0cfade11cd53802a22977c /org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java | |
parent | 57f158632d2264d87cbd9e777014340eafa79fad (diff) | |
download | jgit-4dcf2f93db3f31262220140484237cfbb4189f4d.tar.gz jgit-4dcf2f93db3f31262220140484237cfbb4189f4d.zip |
RefDatabase: Introduce getAllRefs method
Currently to get all refs, callers must use:
getRefsByPrefix(ALL)
Introduce getAllRefs, which does this, and migrate all existing
callers of getRefsByPrefix(ALL).
Change-Id: I7b1687c162c8ae836dc7db3ccc7ac847863f691d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java index 2ed5de5c58..f6384a2cea 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java @@ -45,8 +45,6 @@ package org.eclipse.jgit.pgm; -import static org.eclipse.jgit.lib.RefDatabase.ALL; - import java.io.IOException; import java.util.List; @@ -67,7 +65,7 @@ class ShowRef extends TextBuiltin { } private Iterable<Ref> getSortedRefs() throws Exception { - List<Ref> all = db.getRefDatabase().getRefsByPrefix(ALL); + List<Ref> all = db.getRefDatabase().getAllRefs(); // TODO(jrn) check if we can reintroduce fast-path by e.g. implementing // SortedList return RefComparator.sort(all); |