CloneStatus (@NotNull ProgressIndicator indicator) { indicator.setIndeterminate(false); GitLineHandlerListener progressListener = GitStandardProgressAnalyzer.createListener(indicator); GitCommandResult result; try { result = git.clone(project, new File(parentDirectory), sourceRepositoryURL, directoryName, progressListener); } catch (Exception e) { if (listener instanceof GitCheckoutListener) { ((GitCheckoutListener) listener).checkoutFailed(null); } throw e; } if (result.success()) { File directory = new File(parentDirectory, directoryName); LOG.debug(String.format("Cloned into %s with success=%s", directory, result)); DvcsUtil.addMappingIfSubRoot(project, directory.getPath(), GitVcs.NAME); destinationParent.refresh(true, true); listener.directoryCheckedOut(directory, GitVcs.getKey()); listener.checkoutCompleted(); return CloneStatus.SUCCESS; } notifyError(project, result, sourceRepositoryURL); if (listener instanceof GitCheckoutListener) { ((GitCheckoutListener) listener).checkoutFailed(result); } return CloneStatus.FAILURE; }