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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux