[mike@mwxm4]

This commit is contained in:
2026-08-11 11:40:32 +02:00
parent 113527f220
commit 39f5b48d94
14 changed files with 719 additions and 39 deletions
+7 -3
View File
@@ -191,7 +191,7 @@ func runCommandDepth(line string, depth int) bool {
case "config": // show the effective configuration and where it came from
if opt["k"] {
fmt.Println(strings.Join(configKeys(), "\n"))
fmt.Println("remote.<name>.url|key|type|visibility")
fmt.Println("remote.<name>.url|key|type|visibility|active")
break
}
showConfig()
@@ -384,13 +384,16 @@ func runCommandDepth(line string, depth int) bool {
break
}
sshOK("touch " + shq(cfg.GitPath+"/"+PRJ+".git"))
if targets, _ := cfg.mirrorTargets(); truthy(cfg.Mirror) && len(targets) > 0 {
handlePushRemote("") // auto-mirror to every configured server
if targets, _ := cfg.mirrorTargets(); truthy(cfg.Mirror) && len(activeRemotes(targets)) > 0 {
handlePushRemote("") // auto-mirror to every active server
}
case "pushremote": // mirror the repo to a public git server via its API
handlePushRemote(strings.Join(fields[1:], " "))
case "deleteremote": // delete the repo on a public git server via its API
handleDeleteRemote(strings.Join(fields[1:], " "))
case "release": // tag a commit and publish it as a release on the mirrors
handleRelease(strings.Join(fields[1:], " "))
@@ -773,6 +776,7 @@ var helpItems = []struct{ cmd, desc string }{
{"init", "make new repository from current directory"},
{"push [comment]", "push changes to git server"},
{"pushremote [@name] [desc]", "mirror repo to the public server(s) (gitea/github/gitlab)"},
{"deleteremote <@name|host>", "delete the repo on that public server (asks first)"},
{"release <tag> [notes]", "tag and publish a release on the public server(s)"},
{"pull", "pull changes from git server"},
{"fetch", "fetch changes from git server"},