Subject: Unexpected behavior on diff -I<regex> --name-only

From: Johannes Altmanninger <[email-masked]>
Date: Mon, 14 Dec 2020 20:00:54 +0100

Since v2.28.0-2-g296d4a94e7 (diff: add -I<regex> that ignores matching changes)
diff -I<regex> 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<regex>:

	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?).