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:
authorJacob Vosmaer <jacob@gitlab.com>2019-09-19 23:44:54 +0300
committerJohn Cai <jcai@gitlab.com>2019-09-19 23:44:54 +0300
commit6897617450042c0cc5582b12277b8df691945ccf (patch)
tree9ef63ffd9d9a384cc8206121ada30544e6db2ac2
parent690b608e093e6fb00e4aa3a46baebdfd8f18e490 (diff)
GetRawChanges: use git.SafeCmd
-rw-r--r--internal/service/repository/raw_changes.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/service/repository/raw_changes.go b/internal/service/repository/raw_changes.go
index c500b3772..254c28b97 100644
--- a/internal/service/repository/raw_changes.go
+++ b/internal/service/repository/raw_changes.go
@@ -60,7 +60,11 @@ func getRawChanges(stream gitalypb.RepositoryService_GetRawChangesServer, repo *
ctx := stream.Context()
- diffCmd, err := git.Command(ctx, repo, "diff", "--raw", "-z", from, to)
+ diffCmd, err := git.SafeCmd(ctx, repo, nil, git.SubCmd{
+ Name: "diff",
+ Flags: []git.Option{git.Flag{"--raw"}, git.Flag{"-z"}},
+ Args: []string{from, to},
+ })
if err != nil {
return fmt.Errorf("start git diff: %v", err)
}