diff options
author | Jonathan Nieder <jrn@google.com> | 2015-07-16 14:50:42 -0700 |
---|---|---|
committer | Jonathan Nieder <jrn@google.com> | 2015-07-16 14:50:42 -0700 |
commit | f8564c760119c5f02bf47aaf80aeee0f439f2d6e (patch) | |
tree | 8d32e511637faaf027fc067a0b8ff71dc463ef14 /org.eclipse.jgit | |
parent | d0e47a99aa65afaea33ffafca0d7c93223df61ca (diff) | |
download | jgit-f8564c760119c5f02bf47aaf80aeee0f439f2d6e.tar.gz jgit-f8564c760119c5f02bf47aaf80aeee0f439f2d6e.zip |
DFS: Remove now-redundant getOneRef
Instead of reimplementing exactRef in a separate, private method,
use it directly.
Change-Id: I0fc06fc46eef0e36e571a6ef622f38dc2aa59038
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java index 1d3f007b27..a1035a1284 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java @@ -110,14 +110,6 @@ public abstract class DfsRefDatabase extends RefDatabase { 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 @@ public abstract class DfsRefDatabase extends RefDatabase { 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 |