diff options
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java | 8 |
1 files changed, 4 insertions, 4 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 32eb067d36..aa3989e481 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 @@ -673,16 +673,16 @@ public class RefDirectory extends RefDatabase { // Write the packed-refs file using an atomic update. We might // wind up reading it twice, before and after the lock, to ensure // we don't miss an edit made externally. - final PackedRefList packed = getPackedRefs(); + PackedRefList packed = getPackedRefs(); if (packed.contains(name)) { inProcessPackedRefsLock.lock(); try { LockFile lck = lockPackedRefsOrThrow(); try { - PackedRefList cur = readPackedRefs(); - int idx = cur.find(name); + packed = refreshPackedRefs(); + int idx = packed.find(name); if (0 <= idx) { - commitPackedRefs(lck, cur.remove(idx), packed, true); + commitPackedRefs(lck, packed.remove(idx), packed, true); } } finally { lck.unlock(); |