mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Pre-select only tracked branch or matched by name in git pull dialog IDEA-242775
GitOrigin-RevId: 5e852722810c13f10f10b82eb48c94e8bc68eec5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
467c0c7601
commit
2ca2dc8b8b
@@ -124,7 +124,12 @@ class GitPullDialog(private val project: Project,
|
||||
val model = branchField.model as MutableCollectionComboBoxModel
|
||||
|
||||
model.update(branches)
|
||||
model.selectedItem = branches.getOrElse(0) { "" }
|
||||
|
||||
val matchingBranch = repository.currentBranch?.findTrackedBranch(repository)?.nameForRemoteOperations
|
||||
?: branches.find { branch -> branch == repository.currentBranchName }
|
||||
?: ""
|
||||
|
||||
model.selectedItem = matchingBranch
|
||||
}
|
||||
|
||||
private fun getRemoteBranches(repository: GitRepository, remote: GitRemote): List<String> {
|
||||
|
||||
Reference in New Issue
Block a user