Browse Source

Merge "Remove duplicate calls to DirCache.unlock on checkout"

stable-1.2
Robin Rosenberg 13 years ago committed by Code Review
parent
commit
23bba6fb48
  1. 9
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

9
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java vendored

@ -396,10 +396,9 @@ public class DirCacheCheckout {
prescanOneTree(); prescanOneTree();
if (!conflicts.isEmpty()) { if (!conflicts.isEmpty()) {
if (failOnConflict) { if (failOnConflict)
dc.unlock();
throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()])); throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
} else else
cleanUpConflicts(); cleanUpConflicts();
} }
@ -448,10 +447,8 @@ public class DirCacheCheckout {
} }
// commit the index builder - a new index is persisted // commit the index builder - a new index is persisted
if (!builder.commit()) { if (!builder.commit())
dc.unlock();
throw new IndexWriteException(); throw new IndexWriteException();
}
} finally { } finally {
objectReader.release(); objectReader.release();
} }

Loading…
Cancel
Save