]> Cypherpunks repositories - gostls13.git/commit
cmd/go: add go mod tidy -diff
authorSam Thanawalla <samthanawalla@google.com>
Tue, 7 May 2024 17:31:40 +0000 (17:31 +0000)
committerSam Thanawalla <samthanawalla@google.com>
Wed, 22 May 2024 20:17:49 +0000 (20:17 +0000)
commitfb5d0cdd491017db1978001b5054cd19569aa8de
treedf3d6b9c020f1c5af543153c80c85aeec8dc9300
parentef225d1c57a97af984af114ee52005314530bbe2
cmd/go: add go mod tidy -diff

The -diff flag causes tidy not to modify the files but instead print the
necessary changes as a unified diff. It exits with a non-zero code
if updates are needed.

Fixes: #27005
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-windows-amd64-longtest
Change-Id: Ie239367f2fc73ecb55ec2ce76442293635c1b47d
Reviewed-on: https://go-review.googlesource.com/c/go/+/585401
Reviewed-by: Michael Matloob <matloob@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/go/alldocs.go
src/cmd/go/internal/modcmd/tidy.go
src/cmd/go/internal/modfetch/fetch.go
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/script/mod_tidy_diff.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_tidy_diff_compat.txt [new file with mode: 0644]