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:
authorJohn Cai <jcai@gitlab.com>2019-09-28 02:09:56 +0300
committerJohn Cai <jcai@gitlab.com>2019-09-28 02:09:56 +0300
commitabe1dad38b3cdb34bf84349b93bcc69f5ee2d2e9 (patch)
tree4afa5aea01fa1e72aa920f120f3304daf54ad71a
parentd6f81ef69e06c81b708a554bd4b82647e65afbc5 (diff)
parent53ced4ddc95ba9f38af19e8532b70917df961699 (diff)
Merge branch 'jramsay/gc-dsl' into 'master'
Use the Git DSL for configureCommitGraph Git command execution Closes #1992 See merge request gitlab-org/gitaly!1522
-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