mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Don't propose origin remote name if there is one
This commit is contained in:
@@ -98,7 +98,8 @@ class GitConfigureRemotesDialog(val project: Project, val repositories: Collecti
|
||||
|
||||
private fun addRemote() {
|
||||
val repository = getSelectedRepo()
|
||||
val dialog = GitDefineRemoteDialog(repository, git)
|
||||
val proposedName = if (repository.remotes.any { it.name == GitRemote.ORIGIN_NAME }) "" else GitRemote.ORIGIN_NAME
|
||||
val dialog = GitDefineRemoteDialog(repository, git, proposedName, "")
|
||||
if (dialog.showAndGet()) {
|
||||
runInModalTask("Adding Remote...", repository,
|
||||
"Add Remote", "Couldn't add remote ${dialog.remoteName} '${dialog.remoteUrl}'") {
|
||||
|
||||
@@ -94,7 +94,7 @@ public class GitDefineRemoteDialog extends DialogWrapper {
|
||||
@Nullable
|
||||
@Override
|
||||
public JComponent getPreferredFocusedComponent() {
|
||||
return myRemoteUrl;
|
||||
return myRemoteName.getText().isEmpty() ? myRemoteName : myRemoteUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user