-
Notifications
You must be signed in to change notification settings - Fork 17.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/go: allow a fork with path […]/vN to replace gopkg.in/[…].vN
Fixes #34254 Change-Id: Ib4e476d31264342538c2cf381177823183cba890 Reviewed-on: https://go-review.googlesource.com/c/go/+/206761 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
- Loading branch information
Bryan C. Mills
committed
Nov 15, 2019
1 parent
5e52ca0
commit 3bea90d
Showing
2 changed files
with
62 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Regression test for golang.org/issue/34254: | ||
# a clone of gopkg.in/[…].vN should be replaceable by | ||
# a fork hosted at corp.example.com/[…]/vN, | ||
# even if there is an explicit go.mod file containing the | ||
# gopkg.in path. | ||
|
||
[short] skip | ||
[!net] skip | ||
[!exec:git] skip | ||
|
||
env GO111MODULE=on | ||
env GOPROXY=direct | ||
env GOSUMDB=off | ||
|
||
# Replacing gopkg.in/[…].vN with a repository with a root go.mod file | ||
# specifying […].vN and a compatible version should succeed, even if | ||
# the replacement path is not a gopkg.in path. | ||
cd dot-to-dot | ||
go list gopkg.in/src-d/go-git.v4 | ||
|
||
-- dot-to-dot/go.mod -- | ||
module golang.org/issue/34254 | ||
|
||
go 1.13 | ||
|
||
require gopkg.in/src-d/go-git.v4 v4.13.1 | ||
|
||
replace gopkg.in/src-d/go-git.v4 v4.13.1 => github.com/src-d/go-git/v4 v4.13.1 |