forked from toolshed/abra
fix: standardise checkout options
This commit is contained in:
@ -142,7 +142,11 @@ func EnsureVersion(recipeName, version string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
opts := &git.CheckoutOptions{Branch: tagRef, Keep: true}
|
||||
opts := &git.CheckoutOptions{
|
||||
Branch: tagRef,
|
||||
Create: false,
|
||||
Force: true,
|
||||
}
|
||||
if err := worktree.Checkout(opts); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -181,7 +185,6 @@ func EnsureLatest(recipeName string) error {
|
||||
checkOutOpts := &git.CheckoutOptions{
|
||||
Create: false,
|
||||
Force: true,
|
||||
Keep: false,
|
||||
Branch: plumbing.ReferenceName(refName),
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user