Revert "fix: dont throw away changes"
continuous-integration/drone/push Build is passing Details

This reverts commit dd0f328a65.

Part of coop-cloud/organising#282.
This commit is contained in:
decentral1se 2021-12-12 02:04:13 +01:00
parent 48e16c414c
commit d087a60e09
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
3 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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 {

View File

@ -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),
}