git: fix dead symref resolution branch in download, it was testing the always-empty ch instead of the symref lookup.

This commit is contained in:
Yasuhiro Matsumoto
2026-07-15 17:52:15 +09:00
parent a73979c570
commit ade6935c91
+2 -2
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]
}
}