diff options
| author | Jeff Carr <[email protected]> | 2025-04-29 17:49:05 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-04-29 17:49:05 -0500 |
| commit | f061bf9730f5243633eb70ce4553577c4ae9e2ef (patch) | |
| tree | 25481649716bd90ea4f917bca6d3652390fc0a07 | |
| parent | 6d62858d69e908bc916ff71a52f4e01a3869e890 (diff) | |
add commit --submit=false option
| -rw-r--r-- | argv.go | 6 | ||||
| -rw-r--r-- | doCommit.go | 3 |
2 files changed, 8 insertions, 1 deletions
@@ -17,7 +17,7 @@ var argv args type args struct { Checkout *CheckoutCmd `arg:"subcommand:checkout" help:"switch branches using 'git checkout'"` Clean *CleanCmd `arg:"subcommand:clean" help:"start over at the beginning"` - Commit *EmptyCmd `arg:"subcommand:commit" help:"'git commit' but errors out if on wrong branch"` + Commit *CommitCmd `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:"show repos git says are dirty"` GitFetch *FindCmd `arg:"subcommand:fetch" help:"run 'git fetch master'"` @@ -40,6 +40,10 @@ type args struct { type EmptyCmd struct { } +type CommitCmd struct { + Submit bool `arg:"--submit" default:"true" help:"submit the patches to forge"` +} + type testCmd string type CleanCmd struct { diff --git a/doCommit.go b/doCommit.go index 4841a1c..b86ba31 100644 --- a/doCommit.go +++ b/doCommit.go @@ -24,6 +24,9 @@ func doCommit() { } newpatches = true } + if !argv.Commit.Submit { + okExit("") + } if newpatches { // if there are enw patches, autocommit them _, err := me.forge.SubmitDevelPatchSet("forge auto commit") |
