diff options
author | James Ramsay <james@jramsay.com.au> | 2019-09-27 00:41:10 +0300 |
---|---|---|
committer | James Ramsay <james@jramsay.com.au> | 2019-10-02 17:21:43 +0300 |
commit | 2fc42a924d775645e3e7719252e084f3a15f7812 (patch) | |
tree | afa585217e4c59586c7e5fb497009d7b2d7e99d4 | |
parent | 52e705c0c1d08360522c29743a3060ba186916c2 (diff) |
Use the Git DSL for Git command execution
-rw-r--r-- | internal/service/repository/gc.go | 6 |
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 } |