rm old code

This commit is contained in:
Jeff Carr 2025-02-21 09:34:41 -06:00
parent 3f1c8bf5c2
commit 27c8c38047
2 changed files with 5 additions and 6 deletions

View File

@ -19,6 +19,7 @@ func (repo *Repo) ExistsUserBranchRemote() bool {
return false return false
} }
/*
// returns true if the user branch exists // returns true if the user branch exists
func (repo *Repo) ExistsUserBranch() bool { func (repo *Repo) ExistsUserBranch() bool {
if repo.GetUserBranchName() == "" { if repo.GetUserBranchName() == "" {
@ -57,7 +58,9 @@ func (repo *Repo) GetBranchHash(branchname string) string {
} }
return "" return ""
} }
*/
/*
func (repo *Repo) GetBranchVersion(branchname string) string { func (repo *Repo) GetBranchVersion(branchname string) string {
if branchname == repo.GetUserBranchName() { if branchname == repo.GetUserBranchName() {
return "user" return "user"
@ -82,6 +85,7 @@ func (repo *Repo) GetBranchVersion(branchname string) string {
} }
return "" return ""
} }
*/
func readRefHash(filename string) string { func readRefHash(filename string) string {
data, _ := os.ReadFile(filename) data, _ := os.ReadFile(filename)

View File

@ -23,14 +23,9 @@ func (repo *Repo) setRepoState() {
} }
} }
if repo.GetDevelVersion() != repo.GetMasterVersion() { if repo.GetDevelVersion() != repo.GetMasterVersion() {
if !repo.ExistsDevelBranch() {
// there is no devel branch. you are safe to proceed
repo.State = "no devel branch"
return
}
if !repo.IsLocalBranch(repo.GetDevelBranchName()) { if !repo.IsLocalBranch(repo.GetDevelBranchName()) {
// the remote devel branch exists but is not checked out // the remote devel branch exists but is not checked out
repo.State = "devel not checked out" repo.State = "no devel branch"
return return
} }
b1 := repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName()) b1 := repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName())