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

     1  env GOPROXY=direct
     2  env GOSUMDB=off
     3  [short] skip
     4  [!git] skip
     5  
     6  # fetch commit hash reachable from refs/heads/* and refs/tags/* is OK
     7  go 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
    11  stderr 'unknown revision'
    12  ! go list -m vcs-test.golang.org/git/unreachable-hash.git@v0.0.0-20170424233410-cbd2996c52d2
    13  stderr 'unknown revision'
    14  ! go list -m vcs-test.golang.org/git/unreachable-hash.git@cbd2996c52d2
    15  stderr 'unknown revision'
    16  
    17  -- go.mod --
    18  module m
    19  

View as plain text