diff options
Diffstat (limited to 'internal/git/updateref/updateref.go')
-rw-r--r-- | internal/git/updateref/updateref.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/git/updateref/updateref.go b/internal/git/updateref/updateref.go index 7df494b18..573aa8bd1 100644 --- a/internal/git/updateref/updateref.go +++ b/internal/git/updateref/updateref.go @@ -24,7 +24,10 @@ type Updater struct { // It is important that ctx gets canceled somewhere. If it doesn't, the process // spawned by New() may never terminate. func New(ctx context.Context, repo repository.GitRepo) (*Updater, error) { - cmd, err := git.StdinCommand(ctx, repo, "update-ref", "-z", "--stdin") + cmd, err := git.SafeStdinCmd(ctx, repo, nil, git.SubCmd{ + Name: "update-ref", + Flags: []git.Option{git.Flag{"-z"}, git.Flag{"--stdin"}}, + }) if err != nil { return nil, err } |