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/vcs/linux.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'pkg/vcs/linux.go') diff --git a/pkg/vcs/linux.go b/pkg/vcs/linux.go index c4e2a90a5..2d20af53c 100644 --- a/pkg/vcs/linux.go +++ b/pkg/vcs/linux.go @@ -26,15 +26,17 @@ type linux struct { *git } -var _ Bisecter = new(linux) -var _ ConfigMinimizer = new(linux) +var ( + _ Bisecter = new(linux) + _ ConfigMinimizer = new(linux) +) -func newLinux(dir string) *linux { +func newLinux(dir string, opts []RepoOpt) *linux { ignoreCC := map[string]bool{ "stable@vger.kernel.org": true, } return &linux{ - git: newGit(dir, ignoreCC), + git: newGit(dir, ignoreCC, opts), } } -- cgit mrf-deployment