diff options
author | Jonathan Nieder <jrn@google.com> | 2015-06-05 14:14:55 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2015-06-05 14:14:55 -0700 |
commit | a04d1ad2f1f0f0bbb852dbddf47dd8057efa3457 (patch) | |
tree | ff56f6325c41d89e07b5c10de39dde74be8b8f63 /org.eclipse.jgit.packaging/pom.xml | |
parent | 336092afa716c2a063c2acb3a64d9d7a6685291a (diff) | |
download | jgit-a04d1ad2f1f0f0bbb852dbddf47dd8057efa3457.tar.gz jgit-a04d1ad2f1f0f0bbb852dbddf47dd8057efa3457.zip |
Introduce exactRef to read a ref whose exact name is known
Unlike getRef(name), the new exactRef method does not walk the search
path. This should produce a less confusing result than getRef when the
exact ref name is known: it will not try to resolve refs/foo/bar to
refs/heads/refs/foo/bar even when refs/foo/bar does not exist.
It can be faster than both getRefs(ALL).get(name) and getRef(name)
because it only needs to examine a single ref.
A follow-up change will introduce a findRef synonym to getRef and
deprecate getRef to make the choice a caller is making more obvious
(exactRef or findRef, with the same semantics as getRefs(ALL).get and
getRefs(ALL).findRef).
Change-Id: If1bd09bcfc9919e7976a4d77f13184ea58dcda52
Signed-off-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit.packaging/pom.xml')
0 files changed, 0 insertions, 0 deletions