diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2019-11-01 18:56:00 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2019-11-01 18:56:00 +0300 |
commit | 201a64d88f1d0810284424ee0c0bdefabbbf36a2 (patch) | |
tree | 0920aff118dcdb7753dd52bc5a2abdcb05f6f70b | |
parent | c8d2fa42a571bec9ff225b9a65c98fa47ca0dba7 (diff) |
GitDSL for UpdateRef cmd
Closes https://gitlab.com/gitlab-org/gitaly/issues/1947
-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 } |