New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/pkgsite/cmd/frontend: unable to git-fetch remote-go-repo after git-init due to branch-name conflict #63254
Comments
My mistake - I have the default-branch-name over-ridden in my git configs. This wouldn't be a real issue in a containerized deployment using default git-configs. |
Ideally the In the scripts in https://cs.opensource.google/go/go/+/master:src/cmd/go/testdata/vcstest/git/ I controlled for the user's default branch name by running |
The relevant code place is https://github.com/golang/pkgsite/blob/14233af499055be3ba3fe6816af8e7d4a4efa9ad/internal/stdlib/gorepo.go#L32 However, with all the released go and toolchains officially in the module proxy (to support the forwards compatibility), I wonder if invoking |
Change https://go.dev/cl/540635 mentions this issue: |
remoteGoRepo.clone inits a repo and then tries to fetch into the "main" branch of the repo. But if the user's settings are for the default branch to be called main, main will already exist and the fetch command will fail. The -f flag will cause the command to do the fetch even though the branch already exists. For golang/go#63254 For golang/go#63744 Change-Id: I33f414654088a67eae4bfa70424d0dc6c34903f0 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/540635 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> kokoro-CI: kokoro <noreply+kokoro@google.com> Run-TryBot: Michael Matloob <matloob@golang.org>
@aslatter Could you verify if the issue is fixed on head or if it's still occurring for you? |
Looks good to me. Now,
Thanks! |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I am attempting to use a locally-hosted instance of pkgsite in "direct proxy mode":
When I make a request for a stdlib package (io or log or the builtin package) pkgsite attempts to check-out the Go release corresponding to the tag requested using the git command-line tool and generate godocs from the git-checkout.
The commands executed are roughly equivalent to the following shell commands:
If the user has their default-git-branch configured to be 'main', the git-fetch operation conflicts with the working-copy created by 'git-init':
A "real" containerized deployment is unlikely to run in to this, as it would be using the default "master" for the "git init".
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: