[mirror] Scalable static site server for Git forges (like GitHub Pages)

Ensure the branch parameter really is a branch

Currently you can specify "Branch: HEAD" or "Branch: refs/tags/v1" and
go-git will resolve it to the relevant ref. Given the HTTP header is
called Branch this is confusing.

+1 -1
+1 -1
src/fetch.go
··· 57 57 repo, err = git.CloneContext(ctx, storer, nil, &git.CloneOptions{ 58 58 Bare: true, 59 59 URL: repoURL, 60 - ReferenceName: plumbing.ReferenceName(branch), 60 + ReferenceName: plumbing.NewBranchReferenceName(branch), 61 61 SingleBranch: true, 62 62 Depth: 1, 63 63 Tags: git.NoTags,