more lame fixes
This commit is contained in:
parent
9cdfface3c
commit
30ee1fcdf7
13
doNormal.go
13
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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue