From c3a09c0c1cbc1aa64ffd53eb0bb76940d6d4937a Mon Sep 17 00:00:00 2001
From: Rhys Arkins <rhys@arkins.net>
Date: Sun, 7 Jun 2020 20:26:26 +0200
Subject: [PATCH] logs: log correct number of branch files to commit

---
 lib/workers/branch/commit.ts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/workers/branch/commit.ts b/lib/workers/branch/commit.ts
index 68bf07eb21..af166f625e 100644
--- a/lib/workers/branch/commit.ts
+++ b/lib/workers/branch/commit.ts
@@ -26,7 +26,8 @@ export async function commitFilesToBranch(
     logger.debug(`No files to commit`);
     return null;
   }
-  logger.debug(`${updatedFiles.length} file(s) to commit`);
+  const fileLength = [...new Set(updatedFiles.map((file) => file.name))].length;
+  logger.debug(`${fileLength} file(s) to commit`);
   // istanbul ignore if
   if (config.dryRun) {
     logger.info('DRY-RUN: Would commit files to branch ' + config.branchName);
-- 
GitLab