use of git4idea.config.GitVersion in project intellij-community by JetBrains.
the class GithubUtil method testGitExecutable.
public static 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) {
GithubNotifications.showErrorDialog(project, GitBundle.getString("find.git.error.title"), e);
return false;
}
if (!version.isSupported()) {
GithubNotifications.showWarningDialog(project, GitBundle.message("find.git.unsupported.message", version.toString(), GitVersion.MIN), GitBundle.getString("find.git.success.title"));
return false;
}
return true;
}
Aggregations