simple shortcut

This commit is contained in:
Jeff Carr 2025-01-28 21:56:43 -06:00
parent 438a8812f6
commit bbf5f79acb
2 changed files with 11 additions and 4 deletions

View File

@ -49,6 +49,7 @@ type CleanCmd struct {
GitReset *EmptyCmd `arg:"subcommand:git-reset" help:"git reset --hard"` GitReset *EmptyCmd `arg:"subcommand:git-reset" help:"git reset --hard"`
User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"` User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"`
Verify *VerifyCmd `arg:"subcommand:verify" help:"verify branches"` Verify *VerifyCmd `arg:"subcommand:verify" help:"verify branches"`
Repo string `arg:"--repo" help:"which repo to look at"`
} }
type VerifyCmd struct { type VerifyCmd struct {

14
main.go
View File

@ -79,6 +79,10 @@ func main() {
} }
if argv.Clean != nil { if argv.Clean != nil {
if argv.Clean.Repo != "" {
log.Info("only looking at repo:", argv.Clean.Repo)
okExit("")
}
if argv.Clean.Examine != nil { if argv.Clean.Examine != nil {
if err := doExamine(); err != nil { if err := doExamine(); err != nil {
badExit(err) badExit(err)
@ -159,11 +163,13 @@ func main() {
log.Info(i, line) log.Info(i, line)
} }
} }
if argv.Patch.Show != nil { findReposWithPatches()
findReposWithPatches() if me.found.Len() == 0 {
me.forge.PrintHumanTable(me.found) log.Info("you have no patches in your user branches")
okExit("patch list empty")
} }
me.forge.PrintHumanTable(me.found)
okExit("patch list") okExit("patch list")
} }