From 3ed08c1ec0bad372f9115ad1af591a7680e7e62a Mon Sep 17 00:00:00 2001 From: Dennis Snell Date: Tue, 18 Oct 2022 17:05:40 -0700 Subject: [PATCH] Fetch depth = 2 to get parent commit --- bin/plugin/lib/git.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/plugin/lib/git.js b/bin/plugin/lib/git.js index 2977892bcac241..e57b242443b8b7 100644 --- a/bin/plugin/lib/git.js +++ b/bin/plugin/lib/git.js @@ -34,7 +34,7 @@ async function cloneAt( repositoryUrl, ref, sha ) { await SimpleGit( gitWorkingDirectoryPath ) .raw( 'init' ) .raw( 'remote', 'add', 'origin', repositoryUrl ) - .raw( 'fetch', '--depth=1', 'origin', ref ) + .raw( 'fetch', '--depth=2', 'origin', ref ) .raw( 'checkout', sha ); return gitWorkingDirectoryPath; }