Re: Mark trailing whitespace error in del lines of diff

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

 



Hi Junio!

On Mo, 25 Mai 2015, Junio C Hamano wrote:

> Christian Brabandt <cblists@xxxxxxxxxx>, Christian Brabandt
> <cb@xxxxxxxxxx> writes:
> 
> > As far as I can see, this does not break any tests and also the 
> > behaviour of git-diff --check does not change. 
> 
> Even if this change introduced a bug that changed the behaviour
> (e.g. say, exited with failure status code when only preimage had
> errors), I wouldn't be surprised if no existing test caught such a
> breakage.  Because the existing tests were written with the
> assumption that the code to check whitespace breakages would never
> look at preimage, it is plausible that no preimage line used in the
> test has any whitespace error in the first place.
> 
> In other words, you'd need to add new tests that change preimage
> lines with various kinds of whitespace errors into postimage lines
> with and without whitespace errors, and run "diff" with various
> combinations of the existing set of core.whitespace values as well
> as your new one.
> 
> But as I said in the other message, I think that the approach this
> patch takes goes in a wrong direction.  Instead of adding a single
> "check and highlight this and only kind of breakage on preimage"
> option as a new kind to existing "what kind of use of whitespaces
> are errors" set, it would be more sensible to add a single "check
> and highlight breakages on preimage lines as well" option that is
> orthogonal to the existing ones that specify "what kind of use of
> whitespaces are errors".

Oh well, too bad. It sounded like a good idea...

Best,
Christian
-- 
Unser Gefühl für Natur gleicht der Empfindung des Kranken für die
Gesundheit.
		-- Friedrich Johann Christoph Schiller
--
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]