]> Cypherpunks repositories - gostls13.git/commit
cmd/go: accept @hash/branch in mod download
authormarwan-at-work <marwan.sameer@gmail.com>
Fri, 16 Nov 2018 02:04:44 +0000 (02:04 +0000)
committerBryan C. Mills <bcmills@google.com>
Fri, 16 Nov 2018 19:46:17 +0000 (19:46 +0000)
commit92caeef8924ab0023719613f573b33d14cb3ef8e
tree5934b5fb3fab8d22b16e43dacfdbb7672dae39f5
parent35244d8fd160f6aa7614f4daa7bfccda1a518510
cmd/go: accept @hash/branch in mod download

Go get in mod-enabled packages lets you do go get "pkg@<hash>" or "pkg@<branch>".
Go internally will switch the hash or branch into a pseudo version.
Go mod download should do the same. The bug lay in the fact that the disk cache
was not being written when Go converted the hash/branch into a pseudo version.

Fixes #27947

Change-Id: I94c29a5c95f69ab18a9cd7a2ecade128047c5e36
GitHub-Last-Rev: 668634b3e70206c6eadabae5969fca1b03093b0d
GitHub-Pull-Request: golang/go#28042
Reviewed-on: https://go-review.googlesource.com/c/140257
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modfetch/cache.go
src/cmd/go/testdata/script/mod_download_hash.txt [new file with mode: 0644]