Re: Mark trailing whitespace error in del lines of diff

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

 



"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes:

> I like this idea.

I don't.

> My use case is determining whether a patch to a pristine-tar
> repository introduced trailing whitespace (which is not okay) or
> just left it there (which is okay).

In your use case, where keeping trailing blank that is otherwise not
OK is fine only when the breakage was inherited from the preimage,
wouldn't it be equally fine to keep other kinds of breakages as long
as they were inherited from the preimage?  E.g. "The original used
8-space as leading indent, and you would not use that for your new
lines, but the breakage was inherited from the preimage" would want
to be treated the same way, no?  Why trailing blanks so special?

So, from that point of view, your "use case" does not justify this
particular implementation that special-cases trailing blanks on
deleted lines and mark them [*1*].

If the implementation were addition of a new option to check and
mark all kinds of errors core.whitespace would catch for new lines
also for old lines, then it would be a somewhat different story.  I
personally do not find such an option interesting, but at least I
can understand why some people might find it useful.


[Footnote]

*1* To support your use case with the ultimate ease-of-use, it would
be best if the new option were to squelch the whitespace error on
the new line when it was inherited from the old line, which is
different from showing and marking the breakage on the old line.
But I do not think it can be implemented sanely, so I will not go
there.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]