develooper Front page | perl.perl5.porters | Postings from June 2009

Re: patch submission(symbian/sdk.pl)

Thread Previous
From:
Craig A. Berry
Date:
June 27, 2009 14:32
Subject:
Re: patch submission(symbian/sdk.pl)
Message ID:
c9ab31fc0906271432k24ebfff7kc46fa37e0aeb6dd9@mail.gmail.com
On Sat, Jun 27, 2009 at 3:02 PM, H.Merijn Brand<h.m.brand@xs4all.nl> wrote:
> On Sat, 27 Jun 2009 13:44:38 -0500, "Craig A. Berry"
> <craig.a.berry@gmail.com> wrote:
>
>> On Sat, Jun 27, 2009 at 12:23 PM, Dave Mitchell<davem@iabyn.com> wrote:
>> > On Sat, Jun 27, 2009 at 11:05:25AM +0200, H.Merijn Brand wrote:
>>
>> >> etc. They won't apply with git-am
>> >
>> > Are you sure they're errors and not just warnings?
>> >
>> > git am shouldn't be refusing to apply a patch that happens to result in a
>> > line with trailing whitespace!
>>
>> I don't think it does.  The default behavior (equivalent to
>> --whitespace=warn) is that it reports "whitespace errors" but commits
>> the patch anyway (assuming the trailing whitespace is the only
>> objection it has).  IMO it really shouldn't use the word "error" when
>> complaining about it because that suggests the apply operation failed.
>>
>> In other words, by default, "whitespace errors" is really just an
>> informational message which means, roughly, "Linus has a pet peeve
>> about trailing whitespace and you should too."  Thanks, but I have one
>> or two more important things to worry about.
>
> In this case I got the warnings, but also a fail. The patch would not
> apply. It however *did* apply when using --whitespace=fix

Aha.  --whitespace=fix appears to be different from the other
--whitespace options in that it also addresses whitespace differences
in the context rather than just the addition of trailing whitespace.
At least some of what it does looks like the moral equivalent of patch
-l.  That is something to be cautious with and people should do what
they can to avoid having their editors, mailers, etc. mangle the
whitespace in the code when they send in patches.  I think the
trailing whitespace used to be the only kind of problem git cared
about, so it's nice to see that's changed.

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About