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) { showErrorDialog(project, "Cannot find git executable.", "Cannot Find Git"); return false; } if (!version.isSupported()) { showErrorDialog(project, "Your version of git is not supported.", "Cannot Find Git"); return false; } return true; }
@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; }
private static boolean isGitSupported(final Project project) { final GitVcsApplicationSettings settings = GitVcsApplicationSettings.getInstance(); final String executable = settings.getPathToGit(); final GitVersion version; try { version = GitVersion.identifyVersion(executable); } catch (Exception ex) { Messages.showErrorDialog( project, CloudReposMessageBundle.message("uploadtogcp.giterror"), ex.getMessage()); return false; } if (!version.isSupported()) { Messages.showWarningDialog( project, CloudReposMessageBundle.message( "uploadtogcp.git.unsupported.message", version.toString(), GitVersion.MIN), CloudReposMessageBundle.message("uploadtogcp.giterror")); return false; } return true; }