From 6a3eb362b357946478438189cc4887a84136e5a4 Mon Sep 17 00:00:00 2001 From: Jake Leveroni Date: Tue, 7 May 2024 10:41:19 -0700 Subject: [PATCH] fixes #706 Include deletions in modified files mask --- modules/git/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/git/src/index.ts b/modules/git/src/index.ts index 3fe7b8cd..715c19ee 100644 --- a/modules/git/src/index.ts +++ b/modules/git/src/index.ts @@ -185,7 +185,7 @@ export async function getModifiedFiles(modified: ModifiedStaged | ModifiedFromTh const isMain = base === currentSha; const isCleanState = await isClean({ step }); - const uncleanArgs = ['diff', '--name-only', '-z', '--diff-filter', 'ACMR']; + const uncleanArgs = ['diff', '--name-only', '-z', '--diff-filter', 'ACMRD']; uncleanArgs.push(!staged ? base : '--cached'); const cleanMainArgs = [ 'diff-tree', @@ -194,7 +194,7 @@ export async function getModifiedFiles(modified: ModifiedStaged | ModifiedFromTh '--name-only', '--no-commit-id', '--diff-filter', - 'ACMR', + 'ACMRD', isMain ? `${currentSha}^` : base, isMain ? currentSha : 'HEAD', ];