Browse Source

Merge "Fix RefUpdate performance for existing Refs"

stable-3.0
Shawn Pearce 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
374406ac46
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java

3
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java

@ -598,7 +598,8 @@ public abstract class RefUpdate {
RevObject newObj; RevObject newObj;
RevObject oldObj; 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; return Result.LOCK_FAILURE;
try { try {
if (!tryLock(true)) if (!tryLock(true))

Loading…
Cancel
Save