On Wed, Jul 02, 2025 at 03:28:43PM -0500, Eric Salem wrote: > The git log --diff-filter documentation[1] for deleted files says: > > > Select only files that are Added (A), Copied (C), Deleted (D)... > > > Also, these upper-case letters can be downcased to exclude. > > E.g. --diff-filter=ad excludes added and deleted paths. > > A simple test: > [...] > --diff-filter=D behaves as expected, but when using "d" instead, I don't > get any output unless I add another option (such as --stat or > --name-only). Looks like a bug. This used to produce the output I'd expect (i.e., commits "first" and "third", which do not have deletions), but that changed in 75408ca949 (diff-filter: be more careful when looking for negative bits, 2022-01-28). I don't have time to dig into it now, but I've cc'd the author (and left your whole reproduction recipe quoted below). -Peff > $ cd $(mktemp -d) > $ git init > Initialized empty Git repository in /tmp/tmp.xnvNav956B/.git/ > $ echo test1 > file1.txt > $ git add file1.txt > $ git commit -m "first" > [master (root-commit) 71288dd00aff] first > 1 file changed, 1 insertion(+) > create mode 100644 file1.txt > $ git rm file1.txt > rm 'file1.txt' > $ git commit -m "second" > [master 6ff8f522b744] second > 1 file changed, 1 deletion(-) > delete mode 100644 file1.txt > $ echo test2 > file2.txt > $ git add file2.txt > $ git commit -m "third" > [master 41498d26ea5e] third > 1 file changed, 1 insertion(+) > create mode 100644 file2.txt > $ git log --format="%H" > 41498d26ea5ee6820834aa51351e1e7ce6ce8733 > 6ff8f522b744dfbc7c2201c5bf77cf5acc3028ce > 71288dd00afff60f3a6576f93930aeb0130e5cd1 > $ git log --format="%H" --diff-filter=D > 6ff8f522b744dfbc7c2201c5bf77cf5acc3028ce > $ git log --format="%H" --diff-filter=d > $ git log --format="%H" --diff-filter=d --stat > 41498d26ea5ee6820834aa51351e1e7ce6ce8733 > > file2.txt | 1 + > 1 file changed, 1 insertion(+) > 71288dd00afff60f3a6576f93930aeb0130e5cd1 > > file1.txt | 1 + > 1 file changed, 1 insertion(+) > $ git version > git version 2.50.0