]> source.dussan.org Git - jgit.git/commit
Allow lookup of multiple exact refs in one shot 77/49577/2
authorJonathan Nieder <jrn@google.com>
Fri, 5 Jun 2015 23:08:55 +0000 (16:08 -0700)
committerJonathan Nieder <jrn@google.com>
Fri, 5 Jun 2015 23:08:55 +0000 (16:08 -0700)
commit48b67012d610f9151b425a27a4287eeedfbff0a4
treed4b680a3f0462046975a5506597c4db0a662f2d9
parenta04d1ad2f1f0f0bbb852dbddf47dd8057efa3457
Allow lookup of multiple exact refs in one shot

exactRef(ref1, ref2, ref3) requests multiple specific refs in a single
lookup, which may be faster in some backends than looking them up one by
one.

firstExactRef generalizes getRef by finding the first existing ref from
the list of refs named.  Its main purpose is for the default
implementation of getRef (finding the first existing ref in a search
path).  Hopefully it can be useful for other operations that look for
refs in a search path (e.g., git log --notes=<name>), too.

Change-Id: I5c6fcf1d3920f6968b8b97f3d4c3a267258c4b86
Signed-off-by: Jonathan Nieder <jrn@google.com>
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryTest.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java