Closed
Description
Go version
go version go1.21.6 darwin/arm64
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/huww98/Library/Caches/go-build'
GOENV='/Users/huww98/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/huww98/go/pkg/mod'
GONOPROXY='gitlab.my-company.com'
GONOSUMDB='gitlab.my-company.com'
GOOS='darwin'
GOPATH='/Users/huww98/go'
GOPRIVATE='gitlab.my-company.com'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.21.6'
GCCGO='gccgo'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/huww98/go/src/github.com/kubernetes-sigs/alibaba-cloud-csi-driver/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/kc/jv1f0gpx6671wxsfd_0hzbbm0000gp/T/go-build2491385028=/tmp/go-build -gno-record-gcc-switches -fno-common'
What did you do?
git clone --depth=1 https://github.com/kubernetes-sigs/alibaba-cloud-csi-driver.git test # any repo should reproduce
git fetch --unshallow --filter=tree:0
git remote remove origin
LANG=C GOOS=linux go build -v
What did you see happen?
# cd /Users/huww98/go/src/github.com/kubernetes-sigs/test; git -c log.showsignature=false show -s --format=%H:%ct
fatal: unable to read tree 38f323b242d199e36b4db5924967c399a26b8e14
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
What did you expect to see?
No error, git revision information is correctly embeded.