summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-03 13:24:14 -0600
committerJeff Carr <[email protected]>2024-12-03 13:24:14 -0600
commit1048ebc85127e0ba2493da3deb54b08620555b9b (patch)
tree18e6a683eb1492fed10abfe0b553286a6d64e026
parenta6b9170ad0ae6ac3e7da794275d692f974ed2140 (diff)
fix for forge.IsReadOnly()v0.22.26
-rw-r--r--init.go4
-rw-r--r--newRepo.go4
2 files changed, 2 insertions, 6 deletions
diff --git a/init.go b/init.go
index 9a22624..f13750a 100644
--- a/init.go
+++ b/init.go
@@ -24,7 +24,7 @@ func Init(f *forgepb.Forge, g *gui.Node) *RepoList {
repos := me.forge.Repos.SortByGoPath()
for repos.Scan() {
repo := repos.Next()
- if me.forge.IsReadOnly(repo.GoPath) {
+ if me.forge.IsReadOnly(repo) {
log.Info("repo scan readonly directory:", repo.FullPath)
} else {
log.Info("repo scan writable directory:", repo.FullPath)
@@ -50,7 +50,7 @@ func InitBox(f *forgepb.Forge, newbox *gui.Node) *RepoList {
repos := me.forge.Repos.SortByGoPath()
for repos.Scan() {
repo := repos.Next()
- if me.forge.IsReadOnly(repo.GoPath) {
+ if me.forge.IsReadOnly(repo) {
log.Info("repo scan readonly directory:", repo.FullPath)
} else {
log.Info("repo scan writable directory:", repo.FullPath)
diff --git a/newRepo.go b/newRepo.go
index f8e5065..b0c583f 100644
--- a/newRepo.go
+++ b/newRepo.go
@@ -62,25 +62,21 @@ func (r *RepoRow) Show2() {
// adds a gui row to the table based off the repo protobuf
func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
- log.Info("isdir() start")
if !pb.IsDirectory() {
// this directory doesn't exist anymore
// was moved, or isn't in the ~/go/src or wherever go.work is
return nil, errors.New("path is gone: " + pb.FullPath)
}
- log.Info("isdir() end")
test, ok := r.allrepos[pb.GetGoPath()]
if ok {
// this repo gopath was already added
return test, nil
}
- log.Info("isdir() end 2")
status, err := repostatus.NewRepoStatusWindow(pb)
if err != nil {
return nil, err
}
- log.Info("isdir() end 3")
newRepo := new(RepoRow)
newRepo.Status = status
newRepo.pb = pb