private void cleanUpConflicts() throws CheckoutConflictException {
// TODO: couldn't we delete unsaved worktree content here?
for (String c : conflicts) {
File conflict = new File(repo.getWorkTree(), c);
if (!conflict.delete())
throw new CheckoutConflictException(MessageFormat.format(
JGitText.get().cannotDeleteFile, c));
removeEmptyParents(conflict);
}
for (String r : removed) {
File file = new File(repo.getWorkTree(), r);
if (!file.delete())
throw new CheckoutConflictException(
MessageFormat.format(JGitText.get().cannotDeleteFile,
file.getAbsolutePath()));
removeEmptyParents(file);
}
}