[mike@mwxm4]
This commit is contained in:
+9
-9
@@ -24,11 +24,11 @@ func showConfig() {
|
||||
project = DIR + "/" + projectRC
|
||||
}
|
||||
|
||||
fmt.Printf("%s %s\n", col(cGray, "global "), col(cCyan, global))
|
||||
fmt.Printf("%s %s\n", col(cDark, "global "), col(cBlue, global))
|
||||
if project != "" {
|
||||
fmt.Printf("%s %s\n", col(cGray, "project"), col(cCyan, project))
|
||||
fmt.Printf("%s %s\n", col(cDark, "project"), col(cBlue, project))
|
||||
} else if PRJ != "" {
|
||||
fmt.Printf("%s %s\n", col(cGray, "project"), col(cGray, "no "+projectRC+" in "+PRJ))
|
||||
fmt.Printf("%s %s\n", col(cDark, "project"), col(cDark, "no "+projectRC+" in "+PRJ))
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
@@ -72,13 +72,13 @@ func showConfig() {
|
||||
}
|
||||
|
||||
if k := sshKeyPath(); k != "" {
|
||||
fmt.Printf(" %s%s\n", col(cGray, padRight("ssh identity", 14)), col(cGray, k))
|
||||
fmt.Printf(" %s%s\n", col(cDark, padRight("ssh identity", 14)), col(cDark, k))
|
||||
}
|
||||
fmt.Printf(" %s%s\n", col(cGray, padRight("clone url", 14)), col(cGray, URL))
|
||||
fmt.Printf(" %s%s\n", col(cDark, padRight("clone url", 14)), col(cDark, URL))
|
||||
// the project's real origin: it can differ from what the current settings
|
||||
// would produce, e.g. after moving the server or editing a project .mgshrc
|
||||
if o := originURL(); o != "" {
|
||||
fmt.Printf(" %s%s\n", col(cGray, padRight("origin", 14)), col(cGray, o))
|
||||
fmt.Printf(" %s%s\n", col(cDark, padRight("origin", 14)), col(cDark, o))
|
||||
}
|
||||
|
||||
showRemotes()
|
||||
@@ -90,11 +90,11 @@ func showRemotes() {
|
||||
targets, incomplete := cfg.mirrorTargets()
|
||||
fmt.Println()
|
||||
if len(targets) == 0 && len(incomplete) == 0 {
|
||||
fmt.Println(col(cGray, "no pushremote targets configured"))
|
||||
fmt.Println(col(cDark, "no pushremote targets configured"))
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Println(col(cGray, "pushremote targets (in push order):"))
|
||||
fmt.Println(col(cDark, "pushremote targets (in push order):"))
|
||||
for _, t := range targets {
|
||||
vis := "private"
|
||||
if strings.EqualFold(strings.TrimSpace(t.Vis), "public") {
|
||||
@@ -106,7 +106,7 @@ func showRemotes() {
|
||||
}
|
||||
fmt.Printf(" %s%s %s\n",
|
||||
col(cGreen, padRight("@"+t.Name, 14)), t.URL,
|
||||
col(cGray, kind+", "+vis+", key "+maskSecret(t.Key)))
|
||||
col(cDark, kind+", "+vis+", key "+maskSecret(t.Key)))
|
||||
}
|
||||
for _, n := range incomplete {
|
||||
fmt.Printf(" %s%s\n", col(cRed, padRight("@"+n, 14)), col(cRed, "incomplete: url or key missing"))
|
||||
|
||||
Reference in New Issue
Block a user