diff options
| -rw-r--r-- | argv.go | 7 | ||||
| -rw-r--r-- | doDirty.go | 5 | ||||
| -rw-r--r-- | main.go | 6 |
3 files changed, 15 insertions, 3 deletions
@@ -54,9 +54,10 @@ type EmptyCmd struct { type testCmd string type ShowCmd struct { - Dirty *EmptyCmd `arg:"subcommand:dirty" help:"show dirty git repos"` - 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"` + Porcelain *EmptyCmd `arg:"subcommand:porcelain" help:"git status --porcelain"` + 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 { @@ -23,3 +23,8 @@ func getDirty() (*gitpb.Repos, string, error) { found := me.forge.CheckDirty() return found, "", nil } + +func getPorcelain() (string, error) { + s, err := me.forge.Repos.CheckPorcelain() + return s, err +} @@ -195,6 +195,12 @@ func doShow() (string, error) { return s, err } + if argv.Show.Porcelain != nil { + s, err := getPorcelain() + me.forge.Repos.Save() + return s, err + } + if argv.Show.Tag != nil { doTag() return "tags shown", nil |
