Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions plugin/src/main/java/consulo/git/config/GitVcsPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public GitVcsPanel(@Nonnull Project project, @Nonnull Disposable uiDisposable) {

mySSHExecutableComboBox = ComboBox.create(GitVcsApplicationSettings.SshExecutable.values());
mySSHExecutableComboBox.setValue(GitVcsApplicationSettings.SshExecutable.IDEA_SSH);
mySSHExecutableComboBox.setTextRender(sshExecutable -> switch (sshExecutable) {
mySSHExecutableComboBox.setTextRenderer(sshExecutable -> switch (sshExecutable) {
case IDEA_SSH -> GitLocalize.gitVcsConfigSshModeIdea();
case NATIVE_SSH -> GitLocalize.gitVcsConfigSshModeNative();
case PUTTY -> GitLocalize.gitVcsConfigSshModePutty();
Expand Down Expand Up @@ -127,9 +127,11 @@ public GitVcsPanel(@Nonnull Project project, @Nonnull Disposable uiDisposable) {
updateMethodLabeled.addBorder(BorderPosition.LEFT, BorderStyle.EMPTY, 18);
myRootPanel.add(updateMethodLabeled);
myRootPanel.add(myAutoUpdateIfPushRejected);
myRootPanel.add(DockLayout.create()
.left(myEnableForcePush)
.right(HorizontalLayout.create(5).add(myProtectedBranchesLabel).add(myProtectedBranchesButton)));
myRootPanel.add(
DockLayout.create()
.left(myEnableForcePush)
.right(HorizontalLayout.create(5).add(myProtectedBranchesLabel).add(myProtectedBranchesButton))
);
}

/**
Expand Down Expand Up @@ -224,7 +226,7 @@ public boolean isModified(@Nonnull GitVcsSettings settings, @Nonnull GitSharedSe
|| settings.isForcePushAllowed() != myEnableForcePush.getValueOrError()
|| settings.getUpdateType() != myUpdateMethodComboBox.getValueOrError()
|| !ContainerUtil.sorted(sharedSettings.getForcePushProhibitedPatterns())
.equals(ContainerUtil.sorted(getProtectedBranchesPatterns()));
.equals(ContainerUtil.sorted(getProtectedBranchesPatterns()));
}

/**
Expand All @@ -236,9 +238,11 @@ public boolean isModified(@Nonnull GitVcsSettings settings, @Nonnull GitSharedSe
public void save(@Nonnull GitVcsSettings settings, GitSharedSettings sharedSettings) {
settings.getAppSettings().setPathToGit(getCurrentExecutablePath());
// run check later
myProject.getUIAccess().give(() -> Task.Backgroundable.queue(myProject, "Checking Git Version...", progressIndicator -> {
myVcs.checkVersion();
}));
myProject.getUIAccess().give(() -> Task.Backgroundable.queue(
myProject,
"Checking Git Version...",
progressIndicator -> myVcs.checkVersion()
));
settings.getAppSettings().setIdeaSsh(mySSHExecutableComboBox.getValueOrError());
settings.setAutoUpdateIfPushRejected(myAutoUpdateIfPushRejected.getValueOrError());

Expand Down
Loading