summaryrefslogtreecommitdiff
path: root/argv.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-05 01:18:47 -0600
committerJeff Carr <[email protected]>2025-01-05 01:18:47 -0600
commit18ee541f89be2e9f9a91c54873da87885e8ffdf5 (patch)
tree3abf86866276cf4ebe1775ab7c0f10d129cf7524 /argv.go
parentc25a7ea736aa4848de7eb6a5efe6124a87c39deb (diff)
'forge dirty' will find and list only dirty repos
Diffstat (limited to 'argv.go')
-rw-r--r--argv.go40
1 files changed, 22 insertions, 18 deletions
diff --git a/argv.go b/argv.go
index 5b90fc4..99d11cd 100644
--- a/argv.go
+++ b/argv.go
@@ -6,33 +6,37 @@ package main
var argv args
+type EmptyCmd struct {
+}
+
type FindCmd struct {
All bool `arg:"--all" help:"select every repo (the default)"`
Mine bool `arg:"--mine" help:"your repos as defined in the forge config"`
Favorites bool `arg:"--favorites" help:"your repos configured as favorites"`
Private bool `arg:"--private" help:"your private repos from your .config/forge/"`
+ Dirty bool `arg:"--dirty" help:"only use dirty git repos"`
// ReadOnly bool `arg:"--readonly" help:"include read-only repos"`
}
type args struct {
- List *FindCmd `arg:"subcommand:list" help:"just show a table of the current state"`
- Dirty *FindCmd `arg:"subcommand:dirty" help:"check if your git repos are dirty"`
- User *FindCmd `arg:"subcommand:user" help:"git checkout user"`
- Devel *FindCmd `arg:"subcommand:devel" help:"git checkout devel"`
- Master *FindCmd `arg:"subcommand:master" help:"git checkout master"`
- GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"`
- Config *FindCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"`
- ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"`
- DryRun bool `arg:"--dry-run" help:"show what would be run"`
- Fix bool `arg:"--fix" help:"fix config, save config & exit"`
- Delete string `arg:"--delete" help:"delete this repo"`
- URL string `arg:"--connect" help:"gowebd url"`
- Register string `arg:"--register" help:"register your git URL (foo.com/mystuff) or (github.com/foo/bar)"`
- GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
- Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
- Force bool `arg:"--force" help:"force redo things"`
- PatchSet string `arg:"--patchset" help:"make patch set"`
- Apply string `arg:"--apply" help:"apply a patch set"`
+ List *FindCmd `arg:"subcommand:list" help:"just show a table of the current state"`
+ Dirty *EmptyCmd `arg:"subcommand:dirty" help:"check if your git repos are dirty"`
+ User *FindCmd `arg:"subcommand:user" help:"git checkout user"`
+ Devel *FindCmd `arg:"subcommand:devel" help:"git checkout devel"`
+ Master *FindCmd `arg:"subcommand:master" help:"git checkout master"`
+ GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"`
+ Config *FindCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"`
+ ListPatchSet bool `arg:"--list-patchset" help:"list patch sets"`
+ DryRun bool `arg:"--dry-run" help:"show what would be run"`
+ Fix bool `arg:"--fix" help:"fix config, save config & exit"`
+ Delete string `arg:"--delete" help:"delete this repo"`
+ URL string `arg:"--connect" help:"gowebd url"`
+ Register string `arg:"--register" help:"register your git URL (foo.com/mystuff) or (github.com/foo/bar)"`
+ GitReset bool `arg:"--git-reset" help:"run 'git reset --hard'"`
+ Scan bool `arg:"--scan" help:"reload protobuf from .git/"`
+ Force bool `arg:"--force" help:"force redo things"`
+ PatchSet string `arg:"--patchset" help:"make patch set"`
+ Apply string `arg:"--apply" help:"apply a patch set"`
}
func (args) Version() string {