The temporary file (if created) is deleted before returning.
319320321322323324325326327328329
} finally { startWalk.release(); r.release(); } } finally { dc.unlock(); revWalk.release(); } return this; }
316317318319320321322323324325326
edit.commit(); } catch (IOException e) { throw new RuntimeException(e); } finally { if (dc != null) dc.unlock(); } } private void resetIndex(RevCommit commit) throws IOException { DirCache dc = repo.lockDirCache();
362363364365366367368369370371372
}); } editor.commit(); } finally { dc.unlock(); if (walk != null) walk.release(); } }
382383384385386387388389390391392
} catch (org.eclipse.jgit.errors.CheckoutConflictException cce) { throw new CheckoutConflictException(checkout.getConflicts(), cce); } } finally { dc.unlock(); } } private void resetMerge() throws IOException { repo.writeMergeHeads(null);
261262263264265266267268269270271
} } finally { odi.release(); } } finally { index.unlock(); } } catch (UnmergedPathException e) { // since UnmergedPathException is a subclass of IOException // which should not be wrapped by a JGitInternalException we // have to catch and re-throw it here
417418419420421422423424425426427
FileUtils.delete(fileToDelete, FileUtils.RECURSIVE | FileUtils.RETRY); } } } finally { dc.unlock(); } RevWalk rw = new RevWalk(repo); RevCommit commit = rw.parseCommit(repo.resolve(Constants.HEAD)); rw.release(); return commit;
251252253254255256257258259260261
builder.add(entry); } builder.commit(); } finally { dc.unlock(); if (walk != null) walk.release(); } } }
313314315316317318319320321322323
updateStashRef(commitId, builder.getAuthor(), builder.getMessage()); } finally { inserter.release(); cache.unlock(); } // Hard reset to HEAD new ResetCommand(repo).setMode(ResetType.HARD).call();
272273274275276277278279280281282
} } finally { odi.release(); } } finally { index.unlock(); } } catch (UnmergedPathException e) { throw new UnmergedPathsException(e); } catch (IOException e) { throw new JGitInternalException(
427428429430431432433434435436437