Merge "Fix RefUpdate performance for existing Refs"

This commit is contained in:
Shawn Pearce 2013-03-04 19:11:08 -05:00 committed by Gerrit Code Review @ Eclipse.org
commit 374406ac46
1 changed files with 2 additions and 1 deletions

View File

@ -598,7 +598,8 @@ private Result updateImpl(final RevWalk walk, final Store store)
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))