Skip to content

Commit

Permalink
Use depth-1 instead of single-branch to clone starters (#20131)
Browse files Browse the repository at this point in the history
Re-implements #729/#730.
  • Loading branch information
devrelm authored and KyleAMathews committed Dec 15, 2019
1 parent b5c09e6 commit b743e62
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions packages/gatsby-cli/src/init-starter.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,9 @@ const clone = async (hostInfo: any, rootPath: string) => {

report.info(`Creating new site from git: ${url}`)

const args = [
`clone`,
...branch,
url,
rootPath,
`--single-branch`,
].filter(arg => Boolean(arg))
const args = [`clone`, ...branch, url, rootPath, `--depth=1`].filter(arg =>
Boolean(arg)
)

await spawnWithArgs(`git`, args)

Expand Down

0 comments on commit b743e62

Please sign in to comment.