mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-08-24 10:13:41 -05:00
Show PushUrls for selected remote if there are any
This commit is contained in:
@@ -106,7 +106,11 @@ func (self *RemotesController) GetOnRenderToMain() func() {
|
||||
if remote == nil {
|
||||
task = types.NewRenderStringTask("No remotes")
|
||||
} else {
|
||||
task = types.NewRenderStringTask(fmt.Sprintf("%s\nUrls:\n%s", style.FgGreen.Sprint(remote.Name), strings.Join(remote.Urls, "\n")))
|
||||
content := fmt.Sprintf("%s\nUrls:\n%s", style.FgGreen.Sprint(remote.Name), strings.Join(remote.Urls, "\n"))
|
||||
if len(remote.PushUrls) > 0 {
|
||||
content += fmt.Sprintf("\nPush Urls:\n%s", strings.Join(remote.PushUrls, "\n"))
|
||||
}
|
||||
task = types.NewRenderStringTask(content)
|
||||
}
|
||||
|
||||
self.c.RenderToMainViews(types.RefreshMainOpts{
|
||||
|
||||
Reference in New Issue
Block a user