diff --git a/doCommit.go b/doCommit.go index ada28a2..742368c 100644 --- a/doCommit.go +++ b/doCommit.go @@ -27,11 +27,7 @@ func doCommit() { okExit("") } if newpatches { - // if there are enw patches, autocommit them - _, err := me.forge.SubmitDevelPatchSet("forge auto commit") - if err != nil { - badExit(err) - } + patchSubmitAndExit() } okExit("") } @@ -74,6 +70,10 @@ func doCommit() { badExit(err) } + patchSubmitAndExit() +} + +func patchSubmitAndExit() { _, err := me.forge.SubmitDevelPatchSet("forge auto commit") if err != nil { // TRY different URL @@ -85,7 +85,8 @@ func doCommit() { if err != nil { badExit(err) } - log.Info("git commit ok. forge done") + + okExit("git commit ok. forge done") } func doCommitRepo(repo *gitpb.Repo) error {