Skip to content

Commit

Permalink
[content-service] Improve CPU utilization for initial git clone command
Browse files Browse the repository at this point in the history
  • Loading branch information
aledbf authored and roboquat committed Jul 16, 2021
1 parent ae57b04 commit 7de657c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions components/content-service/pkg/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,16 +266,16 @@ func (c *Client) Clone(ctx context.Context) (err error) {

args := make([]string, 0)
args = append(args, c.RemoteURI)

for key, value := range c.Config {
args = append(args, "--config")
args = append(args, strings.TrimSpace(key)+"="+strings.TrimSpace(value))
}

args = append(args, "--filter=blob:none")
args = append(args, ".")
if err := c.Git(ctx, "clone", args...); err != nil {
return err
}

return nil
return c.Git(ctx, "clone", args...)
}

// Fetch runs git fetch
Expand Down

0 comments on commit 7de657c

Please sign in to comment.