Skip to content

Commit 7de657c

Browse files
aledbfroboquat
authored andcommitted
[content-service] Improve CPU utilization for initial git clone command
1 parent ae57b04 commit 7de657c

File tree

1 file changed

+4
-4
lines changed
  • components/content-service/pkg/git

1 file changed

+4
-4
lines changed

components/content-service/pkg/git/git.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,16 @@ func (c *Client) Clone(ctx context.Context) (err error) {
266266

267267
args := make([]string, 0)
268268
args = append(args, c.RemoteURI)
269+
269270
for key, value := range c.Config {
270271
args = append(args, "--config")
271272
args = append(args, strings.TrimSpace(key)+"="+strings.TrimSpace(value))
272273
}
274+
275+
args = append(args, "--filter=blob:none")
273276
args = append(args, ".")
274-
if err := c.Git(ctx, "clone", args...); err != nil {
275-
return err
276-
}
277277

278-
return nil
278+
return c.Git(ctx, "clone", args...)
279279
}
280280

281281
// Fetch runs git fetch

0 commit comments

Comments
 (0)