forked from toolshed/abra
		
	fix: don't specify refs when pulling tags
See coop-cloud/organising#477
This commit is contained in:
		@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user