From 3ac33926fb98740d7da4bb33961dea9b68a5d19c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 1 May 2019 12:33:38 +0300 Subject: Fix rep-fetch test failing for git 2.21.0 --- bpkg/fetch-git.cxx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bpkg/fetch-git.cxx b/bpkg/fetch-git.cxx index c84843f..7650bf9 100644 --- a/bpkg/fetch-git.cxx +++ b/bpkg/fetch-git.cxx @@ -1409,6 +1409,12 @@ namespace bpkg else if (verb > 3) v.push_back ("-v"); + // Note that passing --no-tags is not just an optimization. Not doing so + // we may end up with the "would clobber existing tag" git error for a + // changed tag (for example, the version tag advanced for revision) if + // the user has globally configured fetching all remote tags (via the + // remote..tagOpt option or similar). + // // Also note that we don't need to specify --refmap option since we can // rely on the init() function that properly sets the // remote.origin.fetch configuration option. @@ -1419,6 +1425,7 @@ namespace bpkg co.git_option (), "-C", dir, "fetch", + "--no-tags", "--no-recurse-submodules", (shallow ? cstrings ({"--depth", "1"}) : shallow_repo () ? cstrings ({"--unshallow"}) : -- cgit v1.1