cmd/dist: improve isGitRepo to handle git "worktree"s
cmd/dist: improve isGitRepo to handle git "worktree"s

Simply checking the exit code of `git rev-parse --git-dir` should
suffice here, but that requires deviating from the infrastructure
provided by `run`, so I've left that for a future change.

Fixes #11211.

Change-Id: I7cbad86a8a06578f52f66f734f5447b597ddc962
Reviewed-on: https://go-review.googlesource.com/18213
Reviewed-by: Russ Cox <5ad239cb8a44f659eaaee0aa1ea5b94947abe557@golang.org>

momchil-velikov/go,josharian/go,derekmarcotte/go,Samurais/go,Samurais/go,linux-on-ibm-z/go,akutz/go,polyverse-security/go,mwhudson/go,miolini/go,binarycrusader/go,linux-on-ibm-z/go,goodlang/good,goodlang/good,theif519/go,akutz/go,codestation/go,ganboing/go-esx,momchil-velikov/go,CAFxX/go,CAFxX/go,Samurais/go,codestation/go,momchil-velikov/go,sndnvaps/go,vanloswang/go,Samurais/go,Endika/go,suncycheng/go,Cofyc/go,polyverse-security/go,ganboing/go-esx,polyverse-security/go,miolini/go,goodlang/good,binarycrusader/go,miolini/go,binarycrusader/go,ganboing/go-esx,ImJasonH/go,codestation/go,cyberroadie/go,cloudflare/go,nawawi/go,Cofyc/go,akutz/go,josharian/go,linux-on-ibm-z/go,golang/go,josharian/go,cyberroadie/go,codestation/go,goodlang/good,sndnvaps/go,Samurais/go,golang/go,CAFxX/go,derekmarcotte/go,CAFxX/go,vsekhar/elastic-go,linux-on-ibm-z/go,miolini/go,4ad/go,ganboing/go-esx,mwhudson/go,cyberroadie/go,ganboing/go-esx,miolini/go,nawawi/go,cyberroadie/go,sndnvaps/go,vanloswang/go,codestation/go,miolini/go,polyverse-security/go,ImJasonH/go,golang/go,suncycheng/go,suncycheng/go,derekmarcotte/go,ganboing/go-esx,vsekhar/elastic-go,mwhudson/go,binarycrusader/go,polyverse-security/go,nawawi/go,theif519/go,miolini/go,cloudflare/go,cloudflare/go,vsekhar/elastic-go,akutz/go,derekmarcotte/go,Cofyc/go,josharian/go,binarycrusader/go,sndnvaps/go,Endika/go,ganboing/go-esx,Cofyc/go,linux-on-ibm-z/go,4ad/go,vanloswang/go,miolini/go,nawawi/go,vsekhar/elastic-go,codestation/go,polyverse-security/go,theif519/go,mwhudson/go,polyverse-security/go,vanloswang/go,theif519/go,sndnvaps/go,4ad/go,derekmarcotte/go,akutz/go,nawawi/go,momchil-velikov/go,momchil-velikov/go,momchil-velikov/go,Samurais/go,ImJasonH/go,cloudflare/go,golang/go,mwhudson/go,Endika/go,derekmarcotte/go,josharian/go,linux-on-ibm-z/go,Endika/go,ImJasonH/go,theif519/go,golang/go,binarycrusader/go,Samurais/go,ImJasonH/go,linux-on-ibm-z/go,ImJasonH/go,CAFxX/go,ganboing/go-esx,Endika/go,goodlang/good,ImJasonH/go,binarycrusader/go,linux-on-ibm-z/go,ImJasonH/go,Endika/go,momchil-velikov/go,polyverse-security/go,binarycrusader/go,cloudflare/go,vanloswang/go,mwhudson/go,nawawi/go,Cofyc/go,josharian/go,vsekhar/elastic-go,cyberroadie/go,4ad/go,Endika/go,4ad/go,akutz/go,sndnvaps/go,Samurais/go,mwhudson/go,4ad/go,Cofyc/go,golang/go,goodlang/good,4ad/go,cyberroadie/go,CAFxX/go,codestation/go,cyberroadie/go,theif519/go,vanloswang/go,suncycheng/go,suncycheng/go,josharian/go,akutz/go,vanloswang/go,akutz/go,codestation/go,vsekhar/elastic-go,suncycheng/go,vanloswang/go,cloudflare/go,cloudflare/go,vsekhar/elastic-go,goodlang/good,cyberroadie/go,CAFxX/go,suncycheng/go,Cofyc/go,suncycheng/go,derekmarcotte/go,theif519/go,christopher-henderson/Go,nawawi/go,mwhudson/go,vsekhar/elastic-go,sndnvaps/go,golang/go,sndnvaps/go,theif519/go,momchil-velikov/go,4ad/go,nawawi/go,Endika/go,golang/go,CAFxX/go,goodlang/good,derekmarcotte/go,josharian/go,cloudflare/go,Cofyc/go