]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch/codehost: add lockfiles for repos
authorBryan C. Mills <bcmills@google.com>
Thu, 25 Oct 2018 20:42:26 +0000 (16:42 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 29 Nov 2018 18:57:38 +0000 (18:57 +0000)
commita2b4ac6cf29d31f1c927720712a25cda7bfbc682
tree60558e23820d57ba64c952db9b8e234c3a67d994
parent143c1c82371d52a4f2cf72c56eaaac4c8766e234
cmd/go/internal/modfetch/codehost: add lockfiles for repos

The lockfile guards calls that may change the repo's filesystem contents.

We don't know how robust VCS implementations are to running
simultaneous commands, and this way we don't need to care: only one
'go' command at a time will modify any given repository.

If we can guarantee that particular VCS implementations are robust
enough across all of the VCS tool versions we support, we may be able
to remove some of this locking to improve parallelism.

Updates #26794

Change-Id: I578524974f5015629239cef43d3793aee2b9075c
Reviewed-on: https://go-review.googlesource.com/c/146381
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
src/cmd/go/internal/modfetch/codehost/codehost.go
src/cmd/go/internal/modfetch/codehost/git.go
src/cmd/go/internal/modfetch/codehost/vcs.go