rm more readonly stuff finally

This commit is contained in:
Jeff Carr 2025-09-11 06:41:22 -05:00
parent c2e3108698
commit cb60421374
1 changed files with 14 additions and 12 deletions

View File

@ -50,19 +50,21 @@ func (r *Repo) MergeToMaster() (*cmd.Status, error) {
if r.GetCurrentBranchName() != r.GetMasterBranchName() { if r.GetCurrentBranchName() != r.GetMasterBranchName() {
return nil, fmt.Errorf("repo not on master branch") return nil, fmt.Errorf("repo not on master branch")
} }
if r.GetReadOnly() { /*
r.Reload() // rescan the repo if r.GetReadOnly() {
// master branch is read only. you can not git push r.Reload() // rescan the repo
lh := r.GetLocalHash("devel") // master branch is read only. you can not git push
rh := r.GetRemoteHash("devel") lh := r.GetLocalHash("devel")
if lh == rh { rh := r.GetRemoteHash("devel")
// log.Info(r.FullPath, "local devel == remote devel", lh, rh) if lh == rh {
} else { // log.Info(r.FullPath, "local devel == remote devel", lh, rh)
log.Info(r.FullPath, "local devel != remote devel", lh, rh) } else {
log.Info(r.FullPath, "local devel != remote devel", lh, rh)
}
log.Info("can't merge to master on read only() repos. trying anyway")
// return nil, fmt.Errorf("can't merge to master on read only() repos")
} }
log.Info("can't merge to master on read only() repos. trying anyway") */
// return nil, fmt.Errorf("can't merge to master on read only() repos")
}
if r.CheckDirty() { if r.CheckDirty() {
return nil, fmt.Errorf("repo is dirty") return nil, fmt.Errorf("repo is dirty")
} }