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:
authorJames Ramsay <james@jramsay.com.au>2019-09-27 00:41:10 +0300
committerJames Ramsay <james@jramsay.com.au>2019-10-02 17:21:43 +0300
commit2fc42a924d775645e3e7719252e084f3a15f7812 (patch)
treeafa585217e4c59586c7e5fb497009d7b2d7e99d4
parent52e705c0c1d08360522c29743a3060ba186916c2 (diff)
Use the Git DSL for Git command execution
-rw-r--r--internal/service/repository/gc.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/service/repository/gc.go b/internal/service/repository/gc.go
index f1fd830c8..3643f7c71 100644
--- a/internal/service/repository/gc.go
+++ b/internal/service/repository/gc.go
@@ -165,8 +165,10 @@ func fixRef(ctx context.Context, repo *gitalypb.Repository, batch *catfile.Batch
}
// The name is a valid sha, recreate the ref
- updateRefArgs := []string{"update-ref", name, sha}
- cmd, err := git.Command(ctx, repo, updateRefArgs...)
+ cmd, err := git.SafeCmd(ctx, repo, nil, git.SubCmd{
+ Name: "update-ref",
+ Args: []string{name, sha},
+ })
if err != nil {
return err
}