DFS: Remove now-redundant getOneRef

Instead of reimplementing exactRef in a separate, private method,
use it directly.

Change-Id: I0fc06fc46eef0e36e571a6ef622f38dc2aa59038
This commit is contained in:
Jonathan Nieder 2015-07-16 14:50:42 -07:00
parent d0e47a99aa
commit f8564c7601
1 changed files with 1 additions and 9 deletions

View File

@ -110,14 +110,6 @@ public Ref getRef(String needle) throws IOException {
return null;
}
private Ref getOneRef(String refName) throws IOException {
RefCache curr = read();
Ref ref = curr.ids.get(refName);
if (ref != null)
return resolve(ref, 0, curr.ids);
return ref;
}
@Override
public List<Ref> getAdditionalRefs() {
return Collections.emptyList();
@ -219,7 +211,7 @@ private static Ref recreate(Ref old, Ref leaf) {
public RefUpdate newUpdate(String refName, boolean detach)
throws IOException {
boolean detachingSymbolicRef = false;
Ref ref = getOneRef(refName);
Ref ref = exactRef(refName);
if (ref == null)
ref = new ObjectIdRef.Unpeeled(NEW, refName, null);
else