@SuppressWarnings("UnresolvedPropertyKey")
public boolean testGitExecutable(final Project project) {
final GitVcsApplicationSettings settings = GitVcsApplicationSettings.getInstance();
final String executable = settings.getPathToGit();
final GitVersion version;
try {
version = GitVersion.identifyVersion(executable);
} catch (Exception e) {
Messages.showErrorDialog(project, e.getMessage(), GitBundle.getString("find.git.error.title"));
return false;
}
if (!version.isSupported()) {
Messages.showWarningDialog(project, GitBundle.message("find.git.unsupported.message", version.toString(), GitVersion.MIN),
GitBundle.getString("find.git.success.title"));
return false;
}
return true;
}