From dd564a9d29871f791d7856edf3b38142b5b2c5e3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 15 Oct 2020 14:54:25 +0200 Subject: pkg/vcs: add repo OptPrecious and OptDontSandbox options The pkg/vcs code assumed that we fully manage the repo within an autonomous program. In particular it tried to repair any errors by dropping and re-creating the repo. This does not work well for command-line tools that work with a user-provided repo. Add OptPrecious for such uses. Update #2171 --- pkg/bisect/bisect_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/bisect') diff --git a/pkg/bisect/bisect_test.go b/pkg/bisect/bisect_test.go index ee730b724..3bbc2e2ea 100644 --- a/pkg/bisect/bisect_test.go +++ b/pkg/bisect/bisect_test.go @@ -106,7 +106,7 @@ func createTestRepo(t *testing.T) string { } func runBisection(t *testing.T, baseDir string, test BisectionTest) (*Result, error) { - r, err := vcs.NewRepo("test", "64", baseDir) + r, err := vcs.NewRepo("test", "64", baseDir, vcs.OptPrecious) if err != nil { t.Fatal(err) } -- cgit mrf-deployment