This commit is contained in:
Ian Gulliver
2026-10-20 22:15:33 -07:00
parent 627319a01f
commit 2bfa62449d
9 changed files with 45 additions and 57 deletions
+2 -9
View File
@@ -2,7 +2,6 @@ package git
import (
"fmt"
"os/exec"
"strings"
)
@@ -54,12 +53,6 @@ func DeleteSnapshotRefs(repo, taskID string) error {
for _, ref := range refs {
fmt.Fprintf(b, "delete %s\n", ref)
}
cmd := exec.Command("git", "update-ref", "--stdin")
cmd.Dir = repo
cmd.Stdin = strings.NewReader(b.String())
out, err := cmd.CombinedOutput()
if err != nil {
return fmt.Errorf("git update-ref --stdin: %w: %s", err, strings.TrimSpace(string(out)))
}
return nil
_, err = runInput(repo, nil, b.String(), "update-ref", "--stdin")
return err
}