more argv cleanups

This commit is contained in:
Jeff Carr 2025-01-28 17:35:18 -06:00
parent 51ec39d157
commit d16f4d4d32
3 changed files with 10 additions and 9 deletions

10
argv.go
View File

@ -42,12 +42,12 @@ type ExamineCmd struct {
}
type CleanCmd struct {
User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"`
Devel *CleanDevelCmd `arg:"subcommand:devel" help:"clean and verify the devel branches"`
Force *EmptyCmd `arg:"subcommand:force" help:"try harder to delete things. check your patchsets have been saved first."`
Examine *ExamineCmd `arg:"subcommand:examine" help:"examine branches"`
GitReset *EmptyCmd `arg:"subcommand:git-reset" help:"git reset --hard"`
Delete *EmptyCmd `arg:"subcommand:delete" help:"rescan repo"`
Devel *CleanDevelCmd `arg:"subcommand:devel" help:"clean and verify the devel branches"`
Examine *ExamineCmd `arg:"subcommand:examine" help:"examine branches"`
Force *EmptyCmd `arg:"subcommand:force" help:"do destructive stuff"`
GitReset *EmptyCmd `arg:"subcommand:git-reset" help:"git reset --hard"`
User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"`
}
type CleanDevelCmd struct {

View File

@ -29,10 +29,7 @@ func (args) doBashAuto() {
// me.pp.WriteUsageForSubcommand(os.Stderr, me.pp.SubcommandNames()...)
// me.pp.WriteHelpForSubcommand(os.Stderr, me.pp.SubcommandNames()...)
me.pp.WriteHelpForSubcommand(os.Stderr, "clean")
fmt.Fprintln(os.Stderr, "")
fmt.Fprintln(os.Stderr, "hello world")
fmt.Fprintln(os.Stderr, "")
fmt.Println("devel user force clean examine git-reset")
fmt.Println("delete devel force examine force git-reset user")
case "commit":
fmt.Println("--all")
case "config":

View File

@ -123,12 +123,16 @@ func findReposWithPatches() {
all := me.forge.Repos.SortByFullPath()
for all.Scan() {
repo := all.Next()
if repo.GetUserVersion() == "" || repo.GetUserVersion() == "uerr" {
continue
}
if repo.IsDirty() {
me.found.AppendByGoPath(repo)
continue
}
if repo.GetUserVersion() != repo.GetDevelVersion() {
me.found.AppendByGoPath(repo)
continue
}
}
}