Re: [PATCHv3] git apply: option to ignore whitespace differences

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

 



Giuseppe Bilotta <giuseppe.bilotta@xxxxxxxxx> writes:

> Actually, one thing that I've been thinking about doing is to adjust
> the new lines to match the kind of whitespace change the context line
> underwent. Example: if all the context lines had the change 4 spaces
> -> tab, it would be nice to have the new lines undergo the same
> change. However, this is going to be rather hard to implement.

Doing so will be actively wrong.

In the case of "whitespace=fix", it is justifiable to update ws broken
context lines while applying a ws corrected patch to a ws broken target,
and it also is justifiable not to update context lines while applying a ws
broken patch to a ws corrected target, because it is clear which one has
the correct whitespace layout (i.e. output of ws_fix_copy() by definition
is the correct outcome).  But in your example, it is not clear if the
layout using 4 spaces is correct or the one with a tab.  The tool should
refrain from guessing in such a case.
--
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]