Skip to content

Commit

Permalink
Make a shallow clone when cloning a git repository
Browse files Browse the repository at this point in the history
  • Loading branch information
mx-psi committed Mar 18, 2021
1 parent ba86d0a commit f4201a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion licensedb/filer/filer.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ type gitFiler struct {

// FromGitURL returns a Filer that allows accessing all the files in a Git repository given its URL.
func FromGitURL(url string) (Filer, error) {
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{URL: url})
repo, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{URL: url, Depth: 1})
if err != nil {
return nil, errors.Wrapf(err, "could not clone repo from %s", url)
}
Expand Down

0 comments on commit f4201a5

Please sign in to comment.