git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Unexpected behavior on diff -I<regex> --name-only
@ 2020-12-14 19:00 Johannes Altmanninger
  2020-12-14 19:49 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Johannes Altmanninger @ 2020-12-14 19:00 UTC (permalink / raw)
  To: git

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-21 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 19:00 Unexpected behavior on diff -I<regex> --name-only Johannes Altmanninger
2020-12-14 19:49 ` Junio C Hamano
2020-12-16 23:18   ` Johannes Altmanninger
2020-12-16 23:18     ` [PATCH] diff: suppress --name-only paths where all hunks are ignored Johannes Altmanninger
2020-12-17  1:27       ` Re* " Junio C Hamano
2020-12-20 22:34         ` Johannes Altmanninger
2020-12-21 19:29           ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).