summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--argv.go7
-rw-r--r--doDirty.go5
-rw-r--r--main.go6
3 files changed, 15 insertions, 3 deletions
diff --git a/argv.go b/argv.go
index b2e89fb..290402a 100644
--- a/argv.go
+++ b/argv.go
@@ -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 {
diff --git a/doDirty.go b/doDirty.go
index 702302a..203d20c 100644
--- a/doDirty.go
+++ b/doDirty.go
@@ -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
+}
diff --git a/main.go b/main.go
index e4c08ee..cb2423a 100644
--- a/main.go
+++ b/main.go
@@ -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