Merge pull request #179 from mattn/fix/git-download-symref

git: fix dead symref resolution branch in download
This commit is contained in:
mattn
2026-07-15 09:01:06 +00:00
committed by GitHub

4
git.go
View File

@@ -590,8 +590,8 @@ aside from those, there is also:
commitHash = ch
} else if ch, ok := info.Refs["refs/tags/"+ref]; ok {
commitHash = ch
} else if sr, ok := info.Symrefs[ref]; ok && ch != "" {
commitHash, _ = info.Refs[sr]
} else if sr, ok := info.Symrefs[ref]; ok {
commitHash = info.Refs[sr]
}
}