diff --git a/pkg/catalogue/catalogue.go b/pkg/catalogue/catalogue.go index 246a405b8..6f2020252 100644 --- a/pkg/catalogue/catalogue.go +++ b/pkg/catalogue/catalogue.go @@ -525,7 +525,7 @@ func GetRecipeVersions(recipeName string) (RecipeVersions, error) { checkOutOpts := &git.CheckoutOptions{ Create: false, - Keep: true, + Force: true, Branch: plumbing.ReferenceName(ref.Name()), } if err := worktree.Checkout(checkOutOpts); err != nil { @@ -603,7 +603,7 @@ func GetRecipeVersions(recipeName string) (RecipeVersions, error) { refName := fmt.Sprintf("refs/heads/%s", branch) checkOutOpts := &git.CheckoutOptions{ Create: false, - Keep: true, + Force: true, Branch: plumbing.ReferenceName(refName), } if err := worktree.Checkout(checkOutOpts); err != nil { diff --git a/pkg/git/clone.go b/pkg/git/clone.go index 9e25e353d..e099aac9e 100644 --- a/pkg/git/clone.go +++ b/pkg/git/clone.go @@ -76,7 +76,7 @@ func EnsureUpToDate(dir string) error { refName := fmt.Sprintf("refs/heads/%s", branch) checkOutOpts := &git.CheckoutOptions{ Create: false, - Keep: true, + Force: true, Branch: plumbing.ReferenceName(refName), } if err := worktree.Checkout(checkOutOpts); err != nil { diff --git a/pkg/recipe/recipe.go b/pkg/recipe/recipe.go index 52a9bac2a..32d36e584 100644 --- a/pkg/recipe/recipe.go +++ b/pkg/recipe/recipe.go @@ -169,7 +169,7 @@ func EnsureVersion(recipeName, version string) error { opts := &git.CheckoutOptions{ Branch: tagRef, Create: false, - Keep: true, + Force: true, } if err := worktree.Checkout(opts); err != nil { return err @@ -221,7 +221,7 @@ func EnsureLatest(recipeName string) error { refName := fmt.Sprintf("refs/heads/%s", branch) checkOutOpts := &git.CheckoutOptions{ Create: false, - Keep: true, + Force: true, Branch: plumbing.ReferenceName(refName), }