diff options
| author | Jeff Carr <[email protected]> | 2025-01-07 18:45:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-07 18:45:00 -0600 |
| commit | a8088938d255c068b1c465ad19cdaf8e9b07c56c (patch) | |
| tree | 4640b5c42258c7240bcea0d1b4e8adfaec270300 | |
| parent | c4669bc348bf646f93f71a5ece0168bf12495e53 (diff) | |
rm more old code
| -rw-r--r-- | newRepo.go | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -111,20 +111,26 @@ func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) { }) newRepo.endBox.NewButton("commit all", func() { - if !newRepo.pb.IsUserBranch() { + pb := newRepo.pb + if pb == nil { + log.Info("the protobuf is nil. something went wrong in the forge/gitpb mappings") + return + } + if !pb.IsUserBranch() { log.Log(REPOWARN, "can not commit on non user branch") return } r.reposbox.Disable() + // restore anything staged so everything can be reviewed - newRepo.Status.Run([]string{"git", "restore", "--staged", "."}) + pb.RunRealtimeVerbose([]string{"git", "restore", "--staged", "."}) newRepo.Status.XtermWait("git diff") newRepo.Status.XtermWait("git add --all") newRepo.Status.XtermWait("git commit -a") newRepo.Status.XtermWait("git push") if newRepo.Status.CheckDirty() { // commit was not done, restore diff - newRepo.Status.Run([]string{"git", "restore", "--staged", "."}) + pb.RunRealtimeVerbose([]string{"git", "restore", "--staged", "."}) } else { newRepo.NewScan() } |
