Re: git-diff: --ignore-matching-lines has no effect on the output when --name-only is used

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

 



Jeff King <peff@xxxxxxxx> writes:

> I think Junio's response earlier in the thread discusses this, and how
> we already respect "-w" for "--quiet".
>
> I'm not sure I agree with this part that he wrote, though:
>
>> It is just --raw, --name-only, --name-status, and --checkdiff output
>> formats that deliberately ignore content based ignore mechanisms.

Ah, from the end of that non-sentence, something like "[these
formats] haven't been adjusted to the new world view".  The new
world view was described with things like "-w vs --quiet" that
changed the semantics over time.

> I can see how it gets weird when you ask for --raw, but ...

The "--raw" output should never change its behaviour (as that
designed to be machine readable, and the reader is expected to make
good use of the object names by grabbing the contents of the
blob---instead of learning a single bit "are they different?").
"--checkdiff" is about detecting malformatted code, and omitting the
path from output only because it is a patch that does nothing other
than making the indentation worse (hence with -w, diff will say "ah,
no non-whitespace chagne") does not make sense, do practically
"--name-status" and "--name-only" are the only things that could be
updated.

> I do wonder if changing it at this point would somehow break somebody's
> workflow or have unexpected fallout, though.

That is certainly a concern.

I won't be touching the code for this change myself, but I can help
reviewing if somebody writes a proposed change.

Thanks.




[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