diff options
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 42 |
1 files changed, 23 insertions, 19 deletions
@@ -12,26 +12,22 @@ import ( var argv args type args struct { - Checkout *CheckoutCmd `arg:"subcommand:checkout" help:"switch git branches"` + Checkout *CheckoutCmd `arg:"subcommand:checkout" help:"switch branches using 'git checkout'"` + Clean *CleanCmd `arg:"subcommand:clean" help:"clean git branches"` + Commit *EmptyCmd `arg:"subcommand:commit" help:"'git commit' but errors out if on wrong branch"` Config *ConfigCmd `arg:"subcommand:config" help:"show your .config/forge/ settings"` - Dirty *DirtyCmd `arg:"subcommand:dirty" help:"check if your git repos are dirty"` - GitReset *EmptyCmd `arg:"subcommand:hard-reset" help:"hard reset your user git branches"` - List *FindCmd `arg:"subcommand:list" help:"just show a table of the current state"` - Patch *PatchCmd `arg:"subcommand:patch" help:"examine and make patch sets"` - GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"` + Dirty *DirtyCmd `arg:"subcommand:dirty" help:"show repos git says are dirty"` GitFetch *FindCmd `arg:"subcommand:fetch" help:"run 'git fetch master'"` - Rescan *EmptyCmd `arg:"subcommand:rescan" help:"recreate the git protobuf repos.pb file"` - Delete *EmptyCmd `arg:"subcommand:delete" help:"untrack a repo"` - Commit *EmptyCmd `arg:"subcommand:commit" help:"smart 'git commit' (errors out if on wrong branch)"` - Clean *CleanCmd `arg:"subcommand:clean" help:"clean out all local branches (safely)"` - Examine *ExamineCmd `arg:"subcommand:examine" help:"examine branches"` - URL string `arg:"--connect" help:"gowebd url"` + List *FindCmd `arg:"subcommand:list" help:"print a table of the current repos"` + Patch *PatchCmd `arg:"subcommand:patch" help:"make patchsets"` + GitPull *FindCmd `arg:"subcommand:pull" help:"run 'git pull'"` + URL string `arg:"--connect" help:"forge url"` All bool `arg:"--all" help:"git commit --all"` Show string `arg:"--show" help:"show a repo"` - Bash bool `arg:"--bash" help:"generate bash completion"` - BashAuto []string `arg:"--auto-complete" help:"does the actual autocompletion"` Force bool `arg:"--force" help:"try to strong arm things"` Verbose bool `arg:"--verbose" help:"show more output"` + Bash bool `arg:"--bash" help:"generate bash completion"` + BashAuto []string `arg:"--auto-complete" help:"todo: move this to go-arg"` } type EmptyCmd struct { @@ -46,9 +42,12 @@ type ExamineCmd struct { } type CleanCmd struct { - Force *EmptyCmd `arg:"subcommand:force" help:"dangerously delete things that are not pushed upstream"` - User *EmptyCmd `arg:"subcommand:user" help:"clean the user branches"` - Devel *CleanDevelCmd `arg:"subcommand:devel" help:"clean and verify the devel branches"` + 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"` } type CleanDevelCmd struct { @@ -91,7 +90,6 @@ type CheckoutCmd struct { } type DirtyCmd struct { - Show bool `arg:"--show-files" help:"also list every dirty file"` } type FindCmd struct { @@ -111,8 +109,13 @@ func (args) Version() string { func (a args) Description() string { return ` -forge -- in the spirit of things like sourceforge +forge -- a tool to git repos at go.wit.com + but you can probably use it for other things + ` +} + +/* This supports GO projects so far. It will work from ~/go/src or where your go.work file is. Since I mostly use ~/go/src, that has been tested more. @@ -132,6 +135,7 @@ Examples: ` } +*/ func (args) doBashHelpDebug() { fmt.Fprintln(os.Stderr, "") |
