From ad2533eb2feb51509aea7b662985fad2dcd137aa Mon Sep 17 00:00:00 2001 From: chaiyut Date: Thu, 30 Mar 2023 16:58:59 +0700 Subject: [PATCH] fix: `git diff` to respect excluded files (#181) --- src/utils/git.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/utils/git.ts b/src/utils/git.ts index 65bb7fb5..fc1630e0 100644 --- a/src/utils/git.ts +++ b/src/utils/git.ts @@ -44,6 +44,11 @@ export const getStagedDiff = async (excludeFiles?: string[]) => { [ ...diffCached, ...filesToExclude, + ...( + excludeFiles + ? excludeFiles.map(excludeFromDiff) + : [] + ), ], );