mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-01-06 03:53:59 +02:00
1dd7307fde
more and more move rebase commit refreshing into existing abstraction and more and more WIP and more handling clicks properly fix merge conflicts update cheatsheet lots more preparation to start moving things into controllers WIP better typing expand on remotes controller moving more code into controllers
20 lines
361 B
Go
20 lines
361 B
Go
package gui
|
|
|
|
// this file is to put things where it's not obvious where they belong while this refactor takes place
|
|
|
|
func (gui *Gui) getSuggestedRemote() string {
|
|
remotes := gui.State.Remotes
|
|
|
|
if len(remotes) == 0 {
|
|
return "origin"
|
|
}
|
|
|
|
for _, remote := range remotes {
|
|
if remote.Name == "origin" {
|
|
return remote.Name
|
|
}
|
|
}
|
|
|
|
return remotes[0].Name
|
|
}
|