cmd/go: git worktrees with gitdir ending in /.git no longer compile for some repos #58978
Labels
FrozenDueToAge
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
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?
Upgraded to the latest Go compiler.
This does not reproduce on all repos, but I noticed it while working on
github.com/neondatabase/autoscaling
. Replicating the error can be done with:(for posterity, the latest commit on the repo above is
0b082ec262
, at time of writing)Doing the above with any Go 1.19 compiler does not fail.
What did you expect to see?
After upgrading from 1.19 to 1.20, the repo should continue to compile with the git worktree structure as shown.
What did you see instead?
It did not compile, failing with:
I am aware that I can fix this problem by adding flags. However, it is a breaking change for a new version to require flags where it didn't before.
Please also note that this is not some sort of degenerate case of using git worktrees; this is the way that I typically structure my local files when working on multiple branches, and has specific unique advantages.
The text was updated successfully, but these errors were encountered: