From 30ee1fcdf77c43a7af7f13ac583ca3665b21ec8f Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 13 Sep 2025 07:19:28 -0500 Subject: [PATCH] more lame fixes --- doNormal.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/doNormal.go b/doNormal.go index 2973251..ce0804a 100644 --- a/doNormal.go +++ b/doNormal.go @@ -56,6 +56,7 @@ func checkNormalRepoState(repo *gitpb.Repo) error { log.Infof("%s != %s\n", repo.FullPath, tmp) if strings.HasPrefix(repo.FullPath, me.forge.Config.ReposDir) { tmp = strings.TrimPrefix(repo.FullPath, me.forge.Config.ReposDir) + tmp = strings.Trim(tmp, "/") repo.Namespace = tmp err = log.Errorf("namespace set to filepath") } @@ -63,6 +64,12 @@ func checkNormalRepoState(repo *gitpb.Repo) error { // log.Infof("%s == %s\n", repo.FullPath, tmp) } + tmp = strings.Trim(repo.Namespace, "/") + if tmp != repo.Namespace { + err = log.Errorf("junk in ns %s", repo.Namespace) + repo.Namespace = tmp + } + if repo.GetMasterBranchName() == "" { me.forge.VerifyBranchNames(repo) log.Info("ABNORMAL: master branch name was blank in", repo.GetFullPath()) @@ -92,5 +99,11 @@ func checkNormalRepoState(repo *gitpb.Repo) error { repo.ReloadCheck() err = log.Errorf("now on user branch") } + + if me.forge.Config.IsReadOnly(repo.GetGoPath()) != repo.GetReadOnly() { + repo.ReadOnly = me.forge.Config.IsReadOnly(repo.GetGoPath()) + log.Info("damnit", repo.FullPath) + err = log.Errorf("readonly bit wrong") + } return err }