summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2011-09-25 04:44:45 -0400
committerCode Review <codereview-daemon@eclipse.org>2011-09-25 04:44:45 -0400
commit23bba6fb488d5ef307fd323e86e5b9214f48ecd5 (patch)
treef1c7665067127f1c14594dcb8ee59267c4f4bcf7
parent51d95bbaea368ff34538943a0de0100e41015852 (diff)
parent4005f3c6934de556f3937b96d98f6eeb28c353bd (diff)
downloadjgit-23bba6fb488d5ef307fd323e86e5b9214f48ecd5.tar.gz
jgit-23bba6fb488d5ef307fd323e86e5b9214f48ecd5.zip
Merge "Remove duplicate calls to DirCache.unlock on checkout"
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index ee162dd506..04f0077d86 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -396,10 +396,9 @@ public class DirCacheCheckout {
prescanOneTree();
if (!conflicts.isEmpty()) {
- if (failOnConflict) {
- dc.unlock();
+ if (failOnConflict)
throw new CheckoutConflictException(conflicts.toArray(new String[conflicts.size()]));
- } else
+ else
cleanUpConflicts();
}
@@ -448,10 +447,8 @@ public class DirCacheCheckout {
}
// commit the index builder - a new index is persisted
- if (!builder.commit()) {
- dc.unlock();
+ if (!builder.commit())
throw new IndexWriteException();
- }
} finally {
objectReader.release();
}