From: Lidong Yan Date: Thu, 24 Jul 2025 01:56:14 GMT Subject: Re: git-diff: --ignore-matching-lines has no effect on the output when --name-only is used Message-ID: <23DF2497-D379-4EAD-9271-D01D7D8F3E8B@gmail.com> In-Reply-To: Junio C Hamano write: > > Lidong Yan writes: > >> The `—ignore-matching-lines` options is introduced in 296d4a94e72 >> (Michał Kępień 2020-10-20 08:48:09 +0200 5803) Since the Git documentation > > WTH is that reference format? Sorry. I should use `git log --format="%h (%s, %ad)" --date=short -n 1 296d4a`. > > It is just --raw, --name-only, --name-status, and --checkdiff output > formats that deliberately ignore content based ignore mechanisms. > > And I do not think it would be a good change to have them follow > "ignore" bits. When asked "has this path been modified?" "what are > the before and after blob object names?" etc., it does not make sense > for the answer to be different depending on the presense of -w or > --ignore-matching options. > So the meaning of --ignore-matching-lines is: although the file has changed, I don't want to see its diff content — it's not that we consider the file unchanged just because the changes match the regular expression. Thanks, Lidong