diff options
| author | Jeff Carr <[email protected]> | 2025-10-10 09:34:31 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-10 09:34:31 -0500 |
| commit | bfeb39c2504eec32091a09b5b8ffe04004f67655 (patch) | |
| tree | 24de0661026b5b5e08cf3796f22b97229408224e /argv.go | |
| parent | 680880b05cf33a19e4b23851384f4fa375846997 (diff) | |
allow show to do default master behaviorv0.25.76
Diffstat (limited to 'argv.go')
| -rw-r--r-- | argv.go | 40 |
1 files changed, 21 insertions, 19 deletions
@@ -35,34 +35,22 @@ type args struct { Fix bool `arg:"--fix" help:"try to make repairs"` } -func (args) Examples() string { - var out string - out += "forge show # show the state of all your repos\n" - out += "forge normal # the defaults for 'normal' forge distributed development\n" - out += " # it will makes a user branch in every git repo\n" - out += "forge clean # removes changes forge might have made\n" - out += " # purges all untracked git files, etc\n" - out += "forge pull --force # 'git pull' on all repos\n" - out += "forge merge --all # merge all patches to devel & master\n" - out += "forge add # scan your current directory for all git repos\n" - return out -} - type EmptyCmd struct { } type testCmd string type ShowCmd struct { - Dirty *EmptyCmd `arg:"subcommand:dirty" help:"show dirty git repos"` - DirtySave *EmptyCmd `arg:"subcommand:dirtysave" help:"check dirty then save"` - Mtime *EmptyCmd `arg:"subcommand:mtime" help:"show mtime changes"` - Repo *RepoCmd `arg:"subcommand:repos" help:"print a table of the current repos"` - Tag *TagCmd `arg:"subcommand:tag" help:"show git tags"` + Dirty *EmptyCmd `arg:"subcommand:dirty" help:"show dirty git repos"` + DirtySave *EmptyCmd `arg:"subcommand:dirtysave" help:"check dirty then save"` + MasterDefault *EmptyCmd `arg:"subcommand:masterdefault" help:"run the default behavior for master branches"` + Mtime *EmptyCmd `arg:"subcommand:mtime" help:"show mtime changes"` + Repo *RepoCmd `arg:"subcommand:repos" help:"print a table of the current repos"` + Tag *TagCmd `arg:"subcommand:tag" help:"show git tags"` } type FixCmd struct { - Porcelain *EmptyCmd `arg:"subcommand:porcelain" help:"git status --porcelain"` + Porcelain *EmptyCmd `arg:"subcommand:porcelain" help:"git status --porcelain"` Urls bool `arg:"--urls" help:"check for changes in repo urls"` Untracked bool `arg:"--untracked" help:"git untracked file list"` DeleteUser bool `arg:"--delete-user" help:"delete all user branches (checks for safety)"` @@ -207,6 +195,20 @@ func (args) Appname() string { return ARGNAME } +func (args) Examples() string { + var out string + out += "forge show # show the state of all your repos\n" + out += "forge normal # the defaults for 'normal' forge distributed development\n" + out += " # it will makes a user branch in every git repo\n" + out += "forge clean # removes changes forge might have made\n" + out += " # purges all untracked git files, etc\n" + out += "forge pull --force # 'git pull' on all repos\n" + out += "forge commit --al # 'git commit' in every dirty repo\n" + out += "forge merge --all # 'git merge' all patches to devel & master\n" + out += "forge add # scan your current directory for all git repos\n" + return out +} + func (a args) DoAutoComplete(pb *prep.Auto) { if pb.Cmd == "" { pb.Autocomplete3([]string{"checkout", "clean", "commit", "gui", "merge", "mode", "patch", "pull", "show", "add", "fixer", "--version", "--force", "dev", "normal"}) |
