Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java10
1 files changed, 10 insertions, 0 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 9a99408981..6a1669b4f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -375,6 +375,16 @@ public class DirCacheCheckout {
* @throws IOException
*/
public boolean checkout() throws IOException {
+ try {
+ return doCheckout();
+ } finally {
+ dc.unlock();
+ }
+ }
+
+ private boolean doCheckout() throws CorruptObjectException, IOException,
+ MissingObjectException, IncorrectObjectTypeException,
+ CheckoutConflictException, IndexWriteException {
toBeDeleted.clear();
if (headCommitTree != null)
preScanTwoTrees();

Back to the top