From 2e01d4247c9e785e0362e7c869c7c35ab729aa49 Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sat, 8 Sep 2018 10:09:51 +0200
Subject: [PATCH] fix(gitfs): fetch prune

Closes #2489
---
 lib/platform/git/storage.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/platform/git/storage.js b/lib/platform/git/storage.js
index 75fa1d2253..4cc680af0d 100644
--- a/lib/platform/git/storage.js
+++ b/lib/platform/git/storage.js
@@ -46,7 +46,11 @@ class Storage {
           git = Git(repoDir).silent(true);
           await git.raw(['remote', 'set-url', 'origin', config.url]);
           const fetchStart = process.hrtime();
-          await git.fetch(config.url, ['--depth=2', '--no-single-branch']);
+          await git.fetch(config.url, [
+            '--depth=2',
+            '--no-single-branch',
+            '--prune',
+          ]);
           const fetchSeconds = Math.round(
             convertHrtime(process.hrtime(fetchStart)).seconds
           );
-- 
GitLab