Show PushUrls for selected remote if there are any

This commit is contained in:
Stefan Haller
2026-05-04 13:09:47 +02:00
parent d0ed65e0fd
commit 6f1c57b604
+5 -1
View File
@@ -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{