]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: improve documentation on defaults for get
authorMarko Mudrinic <mudrinic.mare@gmail.com>
Thu, 15 Jun 2017 17:15:47 +0000 (19:15 +0200)
committerIan Lance Taylor <iant@golang.org>
Thu, 15 Jun 2017 21:20:46 +0000 (21:20 +0000)
The existing docs states that, get looks for a branch or tag
that matches the locally installed version of Go.
First, this is only working for "go1", so it could be confusing.
Second, "If no such version exists it retrieves the most recent
version of the package". It's more the default branch, by git defaults,
rather than most recent version.

This should address the potential unclear parts.

Fixes #20320

Change-Id: Id7d727d88dc350c9902974b64fa28c3766f7e245
Reviewed-on: https://go-review.googlesource.com/45890
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/get/get.go

index 8a5aa5bf4feb094ee64656e41a567332b1c7e2e5..30af611b53274a613e1cce662df5ab4a83c86f54 100644 (file)
 // When checking out or updating a package, get looks for a branch or tag
 // that matches the locally installed version of Go. The most important
 // rule is that if the local installation is running version "go1", get
-// searches for a branch or tag named "go1". If no such version exists it
-// retrieves the most recent version of the package.
+// searches for a branch or tag named "go1". If no such version exists
+// it retrieves the default branch of the package.
 //
 // When go get checks out or updates a Git repository,
 // it also updates any git submodules referenced by the repository.
index 6291a72fc7e3b09689c2d0c12f5a17601090d30d..550321198d122a7e8c09c5e9cbe7732b5452c7eb 100644 (file)
@@ -60,8 +60,8 @@ get uses the first one. For more details see: 'go help gopath'.
 When checking out or updating a package, get looks for a branch or tag
 that matches the locally installed version of Go. The most important
 rule is that if the local installation is running version "go1", get
-searches for a branch or tag named "go1". If no such version exists it
-retrieves the most recent version of the package.
+searches for a branch or tag named "go1". If no such version exists
+it retrieves the default branch of the package.
 
 When go get checks out or updates a Git repository,
 it also updates any git submodules referenced by the repository.