Audit of 627319a
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user