summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go1
-rw-r--r--main.go14
2 files changed, 11 insertions, 4 deletions
diff --git a/argv.go b/argv.go
index 72e49ff..b85a476 100644
--- a/argv.go
+++ b/argv.go
@@ -49,6 +49,7 @@ type CleanCmd struct {
GitReset *EmptyCmd `arg:"subcommand:git-reset" help:"git reset --hard"`
User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"`
Verify *VerifyCmd `arg:"subcommand:verify" help:"verify branches"`
+ Repo string `arg:"--repo" help:"which repo to look at"`
}
type VerifyCmd struct {
diff --git a/main.go b/main.go
index 0b78a21..d5bde4e 100644
--- a/main.go
+++ b/main.go
@@ -79,6 +79,10 @@ func main() {
}
if argv.Clean != nil {
+ if argv.Clean.Repo != "" {
+ log.Info("only looking at repo:", argv.Clean.Repo)
+ okExit("")
+ }
if argv.Clean.Examine != nil {
if err := doExamine(); err != nil {
badExit(err)
@@ -159,11 +163,13 @@ func main() {
log.Info(i, line)
}
}
- if argv.Patch.Show != nil {
- findReposWithPatches()
- me.forge.PrintHumanTable(me.found)
-
+ findReposWithPatches()
+ if me.found.Len() == 0 {
+ log.Info("you have no patches in your user branches")
+ okExit("patch list empty")
}
+ me.forge.PrintHumanTable(me.found)
+
okExit("patch list")
}