summaryrefslogtreecommitdiff
path: root/doNormal.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-13 07:19:28 -0500
committerJeff Carr <[email protected]>2025-09-13 07:19:28 -0500
commit30ee1fcdf77c43a7af7f13ac583ca3665b21ec8f (patch)
tree169ddfc4e30470c05117880308543c11c7498e92 /doNormal.go
parent9cdfface3cf26fe9055c0607033ec121b6cd734c (diff)
more lame fixes
Diffstat (limited to 'doNormal.go')
-rw-r--r--doNormal.go13
1 files changed, 13 insertions, 0 deletions
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
}