Skip to content

cmd/dist: tree fails to build after commit ab096d587f9bb5dcdf895511ee6d213aade7e30f #13840

Description

@siebenmann

Attempting to build the tree after commit ab096d5 reports:

##### Building Go bootstrap tool.
cmd/dist

go tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT

This is because the new code introduced in that commit runs git rev-parse --git-dir in the root of the repository, which on my machine (Fedora 23, git version 2.5.0) causes it to print out merely .git as the path to the Git directory instead of the absolute path. Since all.bash and thus cmd/dist is being run from $GOROOT/src instead of $GOROOT, the new stat check now fails.

On my machine:

$ cd /tmp/go
$ git rev-parse --git-dir
.git
$ cd src
$ git rev-parse --git-dir
/tmp/go/.git

Git also behaves this way on Ubuntu 14.04 LTS (git version 1.9.1), a FreeBSD 9.3 machine I have access to (git version 2.6.1), and OmniOS (git version 1.8.5.6), so I expect this is general long-standing git behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions