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

Part of coop-cloud/organising#226.
This commit is contained in:
decentral1se 2021-11-22 21:11:29 +01:00
parent aea5cc69c3
commit dd0f328a65
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
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,
Force: true,
Keep: true,
Branch: plumbing.ReferenceName(ref.Name()),
}
if err := worktree.Checkout(checkOutOpts); err != nil {
@ -586,7 +586,7 @@ func GetRecipeVersions(recipeName string) (RecipeVersions, error) {
refName := fmt.Sprintf("refs/heads/%s", branch)
checkOutOpts := &git.CheckoutOptions{
Create: false,
Force: true,
Keep: 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,
Force: true,
Keep: true,
Branch: plumbing.ReferenceName(refName),
}
if err := worktree.Checkout(checkOutOpts); err != nil {

View File

@ -168,7 +168,7 @@ func EnsureVersion(recipeName, version string) error {
opts := &git.CheckoutOptions{
Branch: tagRef,
Create: false,
Force: true,
Keep: true,
}
if err := worktree.Checkout(opts); err != nil {
return err
@ -220,7 +220,7 @@ func EnsureLatest(recipeName string) error {
refName := fmt.Sprintf("refs/heads/%s", branch)
checkOutOpts := &git.CheckoutOptions{
Create: false,
Force: true,
Keep: true,
Branch: plumbing.ReferenceName(refName),
}