From: Johannes Altmanninger Date: Mon, 14 Dec 2020 19:00:54 GMT Subject: Unexpected behavior on diff -I --name-only Message-ID: <20201214190054.lrdllbpf6jfrz573@gmail.com> Since v2.28.0-2-g296d4a94e7 (diff: add -I that ignores matching changes) diff -I can be used to suppress hunks of only matching lines. This interacts in a surprising way with --name-only, which lists all changed files, regardless of whether they are filtered out by -I: git diff HEAD~ -I '' # always empty git diff HEAD~ -I '' --name-only # not empty, "-I" does nothing It could be nice to only show names of files with matching hunks (or reject this combination of options?).