diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 24 |
1 files changed, 1 insertions, 23 deletions
@@ -8,7 +8,6 @@ import ( "go.wit.com/dev/alexflint/arg" "go.wit.com/gui" - "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -62,28 +61,7 @@ func main() { } if argv.Commit != nil { - pwd, _ := os.Getwd() - repo := me.forge.Repos.FindByFullPath(pwd) - if repo == nil { - log.Info("what branch are you on?: todo: examine this") - okExit("") - } - if repo.GetCurrentBranchName() != repo.GetUserBranchName() { - me.found.Append(repo) - me.forge.PrintHumanTable(me.found) - log.Info("") - log.Info("wrong branch. Can not commit on", repo.GetCurrentBranchName()) - log.Info("") - okExit("") - } - os.Setenv("LESS", "-XR") - if err := shell.Exec([]string{"git", "diff"}); err != nil { - badExit(err) - } - if err := shell.ExecCheck([]string{"git", "commit", "--all"}); err != nil { - badExit(err) - } - log.Info("git commit ok. forge done") + doCommit() okExit("") } |
