From 8b51a2e03fc604ca871914cd4432ecffa484bf52 Mon Sep 17 00:00:00 2001 From: tosih Date: Wed, 19 Oct 2016 17:31:54 -0700 Subject: [PATCH 1/2] Add --depth=1 to git clone command. --- lib/steps.js | 1 + test/steps/getRepositories.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/steps.js b/lib/steps.js index 3b3bd70..7769e3d 100644 --- a/lib/steps.js +++ b/lib/steps.js @@ -218,6 +218,7 @@ var steps = module.exports = { childProcess.execFile('git', [ 'clone', '-q', + '--depth=1', repo, repoCacheDir ], diff --git a/test/steps/getRepositories.js b/test/steps/getRepositories.js index 9600b12..8019554 100644 --- a/test/steps/getRepositories.js +++ b/test/steps/getRepositories.js @@ -75,6 +75,7 @@ lab.experiment('getRepositories', function () { [ 'clone', '-q', + '--depth=1', 'git@github.com:bkendall/flaming-octo-nemesis', '/cache/bkendall/flaming-octo-nemesis' ] From af763d8e2ad78b7377d8ea2769d2c98cb1366e08 Mon Sep 17 00:00:00 2001 From: tosih Date: Wed, 19 Oct 2016 17:42:45 -0700 Subject: [PATCH 2/2] Add --depth=1 for git cloning without cache. --- lib/steps.js | 1 + test/steps/getRepositories.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/steps.js b/lib/steps.js index 7769e3d..5260e02 100644 --- a/lib/steps.js +++ b/lib/steps.js @@ -288,6 +288,7 @@ var steps = module.exports = { childProcess.execFile('git', [ 'clone', '-q', + '--depth=1', repo, repoTargetDir ], diff --git a/test/steps/getRepositories.js b/test/steps/getRepositories.js index 8019554..db64898 100644 --- a/test/steps/getRepositories.js +++ b/test/steps/getRepositories.js @@ -142,6 +142,7 @@ lab.experiment('getRepositories', function () { [ 'clone', '-q', + '--depth=1', sinon.match.string, sinon.match.string ]