summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-07 18:45:00 -0600
committerJeff Carr <[email protected]>2025-01-07 18:45:00 -0600
commita8088938d255c068b1c465ad19cdaf8e9b07c56c (patch)
tree4640b5c42258c7240bcea0d1b4e8adfaec270300
parentc4669bc348bf646f93f71a5ece0168bf12495e53 (diff)
rm more old code
-rw-r--r--newRepo.go12
1 files changed, 9 insertions, 3 deletions
diff --git a/newRepo.go b/newRepo.go
index 5933f11..7f0a953 100644
--- a/newRepo.go
+++ b/newRepo.go
@@ -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()
}