summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-04-04 06:07:56 -0500
committerJeff Carr <[email protected]>2025-04-04 06:07:56 -0500
commit06cf0f7d844192eacbaeec60e3cc12c9a7968469 (patch)
treec4dfe63eb5999960274e27855dfdbc5d1c7ec464
parent99e30376f0a7835b564e408e877f2faca6ceae29 (diff)
fix defective google "Git on Borg" reposv0.22.114
-rw-r--r--argv.go1
-rw-r--r--argvAutoshell.go2
-rw-r--r--doCheckout.go16
-rw-r--r--main.go6
4 files changed, 19 insertions, 6 deletions
diff --git a/argv.go b/argv.go
index ac60597..aeae447 100644
--- a/argv.go
+++ b/argv.go
@@ -101,6 +101,7 @@ type FindCmd struct {
Private bool `arg:"--private" help:"your private repos from your .config/forge/"`
Dirty bool `arg:"--dirty" help:"only use dirty git repos"`
User bool `arg:"--user" help:"show repos on the user branch"`
+ Full bool `arg:"--full" help:"show full repo names"`
// ReadOnly bool `arg:"--readonly" help:"include read-only repos"`
}
diff --git a/argvAutoshell.go b/argvAutoshell.go
index fd76d45..3b8c98d 100644
--- a/argvAutoshell.go
+++ b/argvAutoshell.go
@@ -42,7 +42,7 @@ func (args) doBashAuto() {
case "examine":
fmt.Println("fix")
case "list":
- fmt.Println("--all --mine --favorites --private")
+ fmt.Println("--full")
case "pull":
fmt.Println("--force")
case "patch":
diff --git a/doCheckout.go b/doCheckout.go
index 8621cc9..fcf095b 100644
--- a/doCheckout.go
+++ b/doCheckout.go
@@ -5,6 +5,7 @@ package main
import (
"fmt"
+ "os"
"path/filepath"
"time"
@@ -191,12 +192,19 @@ func rillCheckoutMaster(repo *gitpb.Repo) error {
// never do dirty repos
return nil
}
- if repo.GetCurrentBranchName() == repo.GetMasterBranchName() {
- // repo is already on master
+ // 'giterr' means something is very wrong with this repo
+ if repo.GetMasterVersion() == "giterr" {
+ repo.CheckoutMaster()
+ log.Info("master == giterr. BAD REPO", repo.GetFullPath())
+ log.Info("master == giterr. BAD REPO", repo.GetFullPath())
+ log.Info("master == giterr. BAD REPO", repo.GetFullPath())
+ cmd := []string{"git", "checkout", "main"} // todo: figure out main
+ repo.RunVerbose(cmd)
+ os.Exit(-1)
return nil
}
- if repo.GetUserVersion() == "uerr" {
- repo.CheckoutMaster()
+ if repo.GetCurrentBranchName() == repo.GetMasterBranchName() {
+ // repo is already on master
return nil
}
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
diff --git a/main.go b/main.go
index 03bfc56..6e63f12 100644
--- a/main.go
+++ b/main.go
@@ -142,7 +142,11 @@ func main() {
if argv.List != nil {
found := argv.List.findRepos()
// print out the repos
- me.forge.PrintHumanTable(found)
+ if argv.List.Full {
+ me.forge.PrintHumanTableFull(found)
+ } else {
+ me.forge.PrintHumanTable(found)
+ }
okExit("")
}