aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2015-11-11 15:50:39 -0800
committerJonathan Nieder <jrn@google.com>2018-12-26 19:29:27 -0800
commitb2ec6405e4f3321e64bdbc2287435b78fabef971 (patch)
treec248bffc9141f130782a54055705bbfb28ecca4e /org.eclipse.jgit/src
parent9895338de1c92d09fe82ec927e5ffd2da0973084 (diff)
downloadjgit-b2ec6405e4f3321e64bdbc2287435b78fabef971.tar.gz
jgit-b2ec6405e4f3321e64bdbc2287435b78fabef971.zip
RefDirectory: Do not use search path to find additional refs
Psuedorefs like FETCH_HEAD and MERGE_HEAD are supposed to be directly under the .git directory, not in other locations in the SEARCH_PATH like refs/ and refs/heads/. Use exactRef to access them. Change-Id: Iab8ac47008822fa78fc0691e239e518c34d7a98e Signed-off-by: Jonathan Nieder <jrn@google.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
index 71f2e9e23f..dcf30c713e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
@@ -412,7 +412,7 @@ public class RefDirectory extends RefDatabase {
public List<Ref> getAdditionalRefs() throws IOException {
List<Ref> ret = new LinkedList<>();
for (String name : additionalRefsNames) {
- Ref r = getRef(name);
+ Ref r = exactRef(name);
if (r != null)
ret.add(r);
}