...

Text file src/cmd/go/testdata/script/mod_get_hash.txt

Documentation: cmd/go/testdata/script

     1env GOPROXY=direct
     2env GOSUMDB=off
     3[short] skip
     4[!git] skip
     5
     6# fetch commit hash reachable from refs/heads/* and refs/tags/* is OK
     7go list -m vcs-test.golang.org/git/unreachable-hash.git@6c0e37b1dcaab081b5c413108a46669027fcf02b # on main branch
     8
     9# fetch other commit hash, even with a non-standard ref, is not OK
    10! go list -m vcs-test.golang.org/git/unreachable-hash.git@cbd2996c52d20dac558bc3b49c342c7c8320a1fc
    11stderr 'unknown revision'
    12! go list -m vcs-test.golang.org/git/unreachable-hash.git@v0.0.0-20170424233410-cbd2996c52d2
    13stderr 'unknown revision'
    14! go list -m vcs-test.golang.org/git/unreachable-hash.git@cbd2996c52d2
    15stderr 'unknown revision'
    16
    17-- go.mod --
    18module m

View as plain text