diff options
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java index 2e4489cda4..96c8361adb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/RefDirectory.java @@ -800,6 +800,13 @@ public class RefDirectory extends RefDatabase { final LooseRef n = scanRef(null, name); if (n == null) return packed.get(name); + + // check whether the found new ref is the an additional ref. These refs + // should not go into looseRefs + for (int i = 0; i < additionalRefsNames.length; i++) + if (name.equals(additionalRefsNames[i])) + return n; + if (looseRefs.compareAndSet(curList, curList.add(idx, n))) modCnt.incrementAndGet(); return n; |