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-09-27 00:51:54 +0300
commit53ced4ddc95ba9f38af19e8532b70917df961699 (patch)
treeb830c65d52c36ac9ed744217e8873cc439ec0a00
parent52e705c0c1d08360522c29743a3060ba186916c2 (diff)
Use the Git DSL for Git command execution
-rw-r--r--internal/service/repository/gc.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/internal/service/repository/gc.go b/internal/service/repository/gc.go
index f1fd830c8..c3519785a 100644
--- a/internal/service/repository/gc.go
+++ b/internal/service/repository/gc.go
@@ -84,9 +84,12 @@ func gc(ctx context.Context, in *gitalypb.GarbageCollectRequest) error {
}
func configureCommitGraph(ctx context.Context, in *gitalypb.GarbageCollectRequest) error {
- args := []string{"config", "core.commitGraph", "true"}
-
- cmd, err := git.Command(ctx, in.GetRepository(), args...)
+ cmd, err := git.SafeCmd(ctx, in.GetRepository(), nil, git.SubCmd{
+ Name: "config",
+ Flags: []git.Option{
+ git.ConfigPair{"core.commitGraph", "true"},
+ },
+ })
if err != nil {
if _, ok := status.FromError(err); ok {
return err