From 244c1c43b1b81451cd7b15800ef3ee569b316df0 Mon Sep 17 00:00:00 2001 From: Sven Steinbauer Date: Wed, 6 Mar 2024 13:53:18 +0000 Subject: [PATCH] Add added files to filter Adding ``--diff-filter=M` will only show modified files, but darker should also check newly added files. Add the `A` option to the diff call to include these --- src/darker/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/darker/git.py b/src/darker/git.py index c74ecc797..995dee2ed 100644 --- a/src/darker/git.py +++ b/src/darker/git.py @@ -136,7 +136,7 @@ def _git_diff_name_only( "diff", "--name-only", "--relative", - "--diff-filter=M", + "--diff-filter=MA", rev1, # rev2 is inserted here if not WORKTREE "--",