Browse Source

Merge "Fix RefUpdate performance for existing Refs"

tags/v3.0.0.201305080800-m7
Shawn Pearce 11 years ago
parent
commit
374406ac46
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java

+ 2
- 1
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java View File

@@ -598,7 +598,8 @@ public abstract class RefUpdate {
RevObject newObj;
RevObject oldObj;

if (getRefDatabase().isNameConflicting(getName()))
// don't make expensive conflict check if this is an existing Ref
if (oldValue == null && getRefDatabase().isNameConflicting(getName()))
return Result.LOCK_FAILURE;
try {
if (!tryLock(true))

Loading…
Cancel
Save