diff --git a/plugins/git4idea/src/git4idea/GitVcs.java b/plugins/git4idea/src/git4idea/GitVcs.java index 29a604029ed3..d848a15c197a 100644 --- a/plugins/git4idea/src/git4idea/GitVcs.java +++ b/plugins/git4idea/src/git4idea/GitVcs.java @@ -460,17 +460,19 @@ public class GitVcs extends AbstractVcs { myVersion = GitVersion.identifyVersion(executable); if (! myVersion.isSupported()) { log.info("Unsupported Git version: " + myVersion); - String message = String.format("The configured version of Git is not supported: %s.
" + - "The minimal supported version is %s. Please update.", + final String SETTINGS_LINK = "settings"; + final String UPDATE_LINK = "update"; + String message = String.format("The configured version of Git is not supported: %s.
" + + "The minimal supported version is %s. Please update.", myVersion, GitVersion.MIN); IMPORTANT_ERROR_NOTIFICATION.createNotification("Unsupported Git version", message, NotificationType.ERROR, new NotificationListener.Adapter() { @Override protected void hyperlinkActivated(@NotNull Notification notification, @NotNull HyperlinkEvent e) { - if (e.getDescription().equals("settings")) { + if (SETTINGS_LINK.equals(e.getDescription())) { ShowSettingsUtil.getInstance().showSettingsDialog(myProject, getConfigurable().getDisplayName()); } - else if (e.getDescription().equals("update")) { + else if (UPDATE_LINK.equals(e.getDescription())) { BrowserUtil.browse("http://git-scm.com"); } }