rm more readonly stuff finally
This commit is contained in:
parent
c2e3108698
commit
cb60421374
|
@ -50,19 +50,21 @@ func (r *Repo) MergeToMaster() (*cmd.Status, error) {
|
|||
if r.GetCurrentBranchName() != r.GetMasterBranchName() {
|
||||
return nil, fmt.Errorf("repo not on master branch")
|
||||
}
|
||||
if r.GetReadOnly() {
|
||||
r.Reload() // rescan the repo
|
||||
// master branch is read only. you can not git push
|
||||
lh := r.GetLocalHash("devel")
|
||||
rh := r.GetRemoteHash("devel")
|
||||
if lh == rh {
|
||||
// log.Info(r.FullPath, "local devel == remote devel", lh, rh)
|
||||
} else {
|
||||
log.Info(r.FullPath, "local devel != remote devel", lh, rh)
|
||||
/*
|
||||
if r.GetReadOnly() {
|
||||
r.Reload() // rescan the repo
|
||||
// master branch is read only. you can not git push
|
||||
lh := r.GetLocalHash("devel")
|
||||
rh := r.GetRemoteHash("devel")
|
||||
if 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() {
|
||||
return nil, fmt.Errorf("repo is dirty")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue