wrong logic

This commit is contained in:
Jeff Carr 2025-02-21 17:17:10 -06:00
parent 587a3debeb
commit 5ec788fe17
1 changed files with 4 additions and 5 deletions

View File

@ -112,13 +112,12 @@ func (repo *Repo) IsLocalBranch(findname string) bool {
loop := repo.Tags.All()
for loop.Scan() {
t := loop.Next()
// log.Info("LocalTagExists() tag:", t.Refname)
tagname := t.Refname
if strings.HasPrefix(tagname, "refs/heads") {
if !strings.HasPrefix(t.Refname, "refs/heads") {
// log.Info("LocalTagExists() skip tag:", t.Refname)
continue
}
path, filename := filepath.Split(tagname)
// log.Info("LocalTagExists() check tag:", t.Refname)
path, filename := filepath.Split(t.Refname)
log.Log(INFO, "gitpb.IsBranch() tag:", path, filename, "from", repo.GetGoPath())
if filename == findname {
log.Log(INFO, "gitpb.IsBranch() found tag:", path, filename, "from", repo.GetGoPath())