]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: add a regression test for Git configurations with safe.bareRepository=explicit
authorBryan C. Mills <bcmills@google.com>
Mon, 8 May 2023 13:15:25 +0000 (09:15 -0400)
committerGopher Robot <gobot@golang.org>
Fri, 12 May 2023 17:56:45 +0000 (17:56 +0000)
Change-Id: I394265a4bf849ec89ac44c67aeaaaca801e46caa
Reviewed-on: https://go-review.googlesource.com/c/go/+/493476
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Emily Shaffer <emilyshaffer@google.com>
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>

src/cmd/go/testdata/script/mod_download_git_bareRepository.txt [new file with mode: 0644]

diff --git a/src/cmd/go/testdata/script/mod_download_git_bareRepository.txt b/src/cmd/go/testdata/script/mod_download_git_bareRepository.txt
new file mode 100644 (file)
index 0000000..8050461
--- /dev/null
@@ -0,0 +1,19 @@
+[short] skip
+[!git] skip
+[!GOOS:linux] skip  # Uses XDG_CONFIG_HOME
+
+env GIT_CONFIG_GLOBAL=$WORK/.gitconfig
+env GOPRIVATE=vcs-test.golang.org
+
+go mod download -x
+
+-- go.mod --
+module test
+
+go 1.18
+
+require vcs-test.golang.org/git/gitrepo1.git v1.2.3
+
+-- $WORK/.gitconfig --
+[safe]
+bareRepository = explicit