On 30 May 2016 at 21:06, Junio C Hamano wrote:
> Robert Dailey writes:
>
>> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace
>> --unidiff-zero
>>
>> This command explicitly leaves out context because it can sometimes
>> cause the
Robert Dailey 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
Junio C Hamano writes:
> Robert Dailey writes:
>
>> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace
>> --unidiff-zero
>>
>> This command explicitly leaves out context because it can sometimes
>> cause the patch to fail to apply,
Robert Dailey writes:
> I like your solution better than mine because it utilizes the rules
> defined in .gitattributes.
A difference that may be more important is that I do not do
generation of a patch or application of it without ignoring
whitespaces with things like
On Mon, May 30, 2016 at 2:06 PM, Junio C Hamano wrote:
> I have had this in my ~/.gitconfig for a long time.
>
> [alias]
> wsadd = "!sh -c 'git diff -- \"$@\" | git apply --cached
> --whitespace=fix;\
> git co -- ${1-.} \"$@\"' -"
>
> That is, "take
Robert Dailey writes:
> $ git diff -U0 -w --no-color | git apply --cached --ignore-whitespace
> --unidiff-zero
>
> This command explicitly leaves out context because it can sometimes
> cause the patch to fail to apply, I think due to whitespace being in
> it, but I'm
I think it would be useful to have a '-w' option for 'git add' that
completely ignores whitespace changes, the same way that 'git diff -w'
does.
Real life scenario:
Sometimes developers will use tooling that does not properly strip
trailing whitespace in source files. Next time I edit those
7 matches
Mail list logo