summaryrefslogtreecommitdiff
path: root/addRepo.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-17 14:22:24 -0600
committerJeff Carr <[email protected]>2024-02-17 14:22:24 -0600
commitb298958bcd460763e44348467c1c5bd4591b11e7 (patch)
tree395e4be5e31b3939fc1ca596642be2b0d634db7c /addRepo.go
parent1b103f2a1c9beb87e61ebbd04fe7cdbf605988ed (diff)
early successes. autotypist works
Diffstat (limited to 'addRepo.go')
-rw-r--r--addRepo.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/addRepo.go b/addRepo.go
index 5d82568..9dc5cea 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -45,11 +45,11 @@ func (r *Repo) Show() {
}
func (r *RepoList) AddRepo(path string, master string, devel string, user string) *Repo {
- return addRepo(r.reposgrid, path, master, devel, user)
+ return r.addRepo(r.reposgrid, path, master, devel, user)
}
-func addRepo(grid *gui.Node, path string, master string, devel string, user string) *Repo {
- _, ok := me.allrepos[path]
+func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel string, user string) *Repo {
+ _, ok := r.allrepos[path]
if ok {
log.Info("addRepo() already had path", path)
return nil
@@ -89,14 +89,14 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
})
newRepo.endBox.NewButton("show diff", func() {
- me.reposwin.Disable()
+ r.reposbox.Disable()
// newRepo.status.XtermNohup([]string{"git diff"})
newRepo.status.Xterm("git diff; bash")
- me.reposwin.Enable()
+ r.reposbox.Enable()
})
newRepo.endBox.NewButton("commit all", func() {
- me.reposwin.Disable()
+ r.reposbox.Disable()
// restore anything staged so everything can be reviewed
newRepo.status.RunCmd([]string{"git", "restore", "--staged", "."})
newRepo.status.XtermWait("git diff")
@@ -107,9 +107,9 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
// commit was not done, restore diff
newRepo.status.RunCmd([]string{"git", "restore", "--staged", "."})
} else {
- newRepo.newScan()
+ newRepo.NewScan()
}
- me.reposwin.Enable()
+ r.reposbox.Enable()
})
newRepo.hidden = false
@@ -134,6 +134,6 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
}
grid.NextRow()
- me.allrepos[path] = newRepo
+ r.allrepos[path] = newRepo
return newRepo
}