From eb0af6d1f1724ef197106facbafe34119ed38e21 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sun, 13 Aug 2023 14:06:02 +0200 Subject: [PATCH] fix: don't specify refs when pulling tags See https://git.coopcloud.tech/coop-cloud/organising/issues/477 --- pkg/recipe/recipe.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 69c646af..ca5aabfc 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -25,7 +25,6 @@ import ( composetypes "github.com/docker/cli/cli/compose/types" "github.com/docker/distribution/reference" "github.com/go-git/go-git/v5" - gitConfig "github.com/go-git/go-git/v5/config" "github.com/go-git/go-git/v5/plumbing" "github.com/sirupsen/logrus" ) @@ -647,12 +646,7 @@ func EnsureUpToDate(recipeName string, conf *runtime.Config) error { return fmt.Errorf("unable to check out default branch in %s: %s", recipeDir, err) } - fetchOpts := &git.FetchOptions{ - Tags: git.AllTags, - RefSpecs: []gitConfig.RefSpec{ - gitConfig.RefSpec(fmt.Sprintf("%s:%s", branch, branch)), - }, - } + fetchOpts := &git.FetchOptions{Tags: git.AllTags} if err := repo.Fetch(fetchOpts); err != nil { if !strings.Contains(err.Error(), "already up-to-date") { return fmt.Errorf("unable to fetch tags in %s: %s", recipeDir, err)