Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2019-11-01 18:56:00 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2019-11-01 18:56:00 +0300
commit201a64d88f1d0810284424ee0c0bdefabbbf36a2 (patch)
tree0920aff118dcdb7753dd52bc5a2abdcb05f6f70b
parentc8d2fa42a571bec9ff225b9a65c98fa47ca0dba7 (diff)
GitDSL for UpdateRef cmd
Closes https://gitlab.com/gitlab-org/gitaly/issues/1947
-rw-r--r--internal/git/updateref/updateref.go5
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
}