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:
parent
d0e47a99aa
commit
f8564c7601
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue