From 27c8c380475147f640fb971fe5ac5d0b5d1b2ac3 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 21 Feb 2025 09:34:41 -0600 Subject: [PATCH] rm old code --- branches.go | 4 ++++ reloadRepoState.go | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/branches.go b/branches.go index 46ea091..ed9bbf9 100644 --- a/branches.go +++ b/branches.go @@ -19,6 +19,7 @@ func (repo *Repo) ExistsUserBranchRemote() bool { return false } +/* // returns true if the user branch exists func (repo *Repo) ExistsUserBranch() bool { if repo.GetUserBranchName() == "" { @@ -57,7 +58,9 @@ func (repo *Repo) GetBranchHash(branchname string) string { } return "" } +*/ +/* func (repo *Repo) GetBranchVersion(branchname string) string { if branchname == repo.GetUserBranchName() { return "user" @@ -82,6 +85,7 @@ func (repo *Repo) GetBranchVersion(branchname string) string { } return "" } +*/ func readRefHash(filename string) string { data, _ := os.ReadFile(filename) diff --git a/reloadRepoState.go b/reloadRepoState.go index 7707c42..296d43d 100644 --- a/reloadRepoState.go +++ b/reloadRepoState.go @@ -23,14 +23,9 @@ func (repo *Repo) setRepoState() { } } 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()) { // the remote devel branch exists but is not checked out - repo.State = "devel not checked out" + repo.State = "no devel branch" return } b1 := repo.CountDiffObjects(repo.GetMasterBranchName(), repo.GetDevelBranchName())