Re: git add without whitespace

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

 



Robert Dailey <rcdailey.lists@xxxxxxxxx> writes:

> - Splitting whitespace & real changes to two commits is probably
> superfluous; my original goal was to make diffing the actual changes
> easier, but since 'git diff -w' exists this is moot.

Doing "whitespace clean-up" in a separate preparatory patch _is_ a
good practice.  I do not think either approach makes it harder to
do.  After all, if you had a real change on the same line that you
dropped a broken whitespace, e.g. (end-of-line shown with '$')

    -	if  (i==1) {  $
    +   if (j == 2) {$

both approaches would add the updated line.

The wsadd is about protecting _me_ from introducing new whitespace
breakages, not about helping me when fixing existing whitespace
breakages.  So from that point of view, that may not fit well to
what you are trying to do.

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