Skip to content

Commit 5add546

Browse files
committed
refactor(templates): use depth of 1 in clone command to limit history fetched
1 parent c3cab01 commit 5add546

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

internal/templates/template.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func InitFromRepo(w io.Writer, repo, subdir, target string) error {
4545
"git", "clone", parsedRepoURL,
4646
// Clone and checkout a specific ref
4747
"-b", lo.Ternary(build.IsDev, "main", build.Version),
48+
// Create shallow clone with depth of 1
49+
"--depth", "1",
4850
tmp,
4951
)
5052
fmt.Fprintf(w, "%s\n", cmd)

0 commit comments

Comments
 (0)