{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/11211","labels_url":"https://api.github.com/repos/golang/go/issues/11211/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/11211/comments","events_url":"https://api.github.com/repos/golang/go/issues/11211/events","html_url":"https://github.com/golang/go/issues/11211","id":88195783,"number":11211,"title":"bootstrap: process cannot produce tip in a clean (detached) work tree","user":{"login":"ohir","id":12509338,"avatar_url":"https://avatars.githubusercontent.com/u/12509338?v=3","gravatar_id":"","url":"https://api.github.com/users/ohir","html_url":"https://github.com/ohir","followers_url":"https://api.github.com/users/ohir/followers","following_url":"https://api.github.com/users/ohir/following{/other_user}","gists_url":"https://api.github.com/users/ohir/gists{/gist_id}","starred_url":"https://api.github.com/users/ohir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ohir/subscriptions","organizations_url":"https://api.github.com/users/ohir/orgs","repos_url":"https://api.github.com/users/ohir/repos","events_url":"https://api.github.com/users/ohir/events{/privacy}","received_events_url":"https://api.github.com/users/ohir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-14T14:45:02Z","updated_at":"2016-01-06T18:08:21Z","closed_at":"2016-01-06T18:08:21Z","body":"*version:* 6b24da6 & go1.4.2 linux/amd64\r\n*trying to:* compile tip *6b24da6*\r\n*bug:* bootstrap process cannot produce tip in a clean (detached) work tree.\r\n\r\n\r\n```shell\r\n# repository status\r\n$ cd /nfs/hq/ghm/golang\r\n$ git log|head -1\r\ncommit 6b24da6ae8321387e9dd02181ccf5b425d4c05f9\r\n$ git status\r\n# On branch master\r\nnothing to commit (working directory clean)\r\n\r\n# checkout from hq approved mirror for golang\r\n# to local tree: /x/gotip\r\n$ git --git-dir=/nfs/hq/ghm/golang/.git \\\r\n      --work-tree=/x/gotip checkout HEAD .\r\n\r\n# check active exports\r\n$ env|grep GO\r\nGOPATH=/u/hub/gva\r\n\r\n# check PATH for old binary\r\n$ which go\r\n/x/go1.4/bin/go\r\n\r\n$ go version\r\ngo version go1.4.2 linux/amd64\r\n\r\n# make tip; supply GOROOT_BOOTSTRAP [see issue 11209]\r\n$ cd /x/gotip/src\r\n$ GOROOT_BOOTSTRAP=/x/go1.4 ./all.bash\r\n\r\n##### Building Go bootstrap tool.\r\ncmd/dist\r\n\r\ngo tool dist: FAILED: not a Git repo; must put a VERSION file in $GOROOT\r\n```\r\n\r\n*Expected:* compile tip/1.5 in a clean srctree; e.g.:\r\n```\r\n$ git --git-dir=/nfs/hq/ghm/golang/.git \\\r\n      --work-tree=/x/go1.4 checkout go1.4.2 .\r\n$ cd /x/go1.4/src\r\n$ ./all.bash\r\n\r\n[... cut compile log ...]\r\n\r\nreal    0m0.212s\r\nuser    0m0.138s\r\nsys 0m0.011s\r\n\r\nALL TESTS PASSED\r\n\r\n---\r\nInstalled Go for linux/amd64 in /x/go1.4\r\nInstalled commands in /x/go1.4/bin\r\n*** You need to add /x/1.4/bin to your PATH.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/169406827","html_url":"https://github.com/golang/go/issues/11211#issuecomment-169406827","issue_url":"https://api.github.com/repos/golang/go/issues/11211","id":169406827,"user":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T18:08:21Z","updated_at":"2016-01-06T18:08:21Z","body":"For the record, the CL that mentions this issue does not solve the problem in the original report, but it does fix an alternate (more modern?) use of git worktrees.\r\n"}}