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

Re: patch submission(symbian/

Thread Previous
Craig A. Berry
June 27, 2009 14:32
Re: patch submission(symbian/
Message ID:
On Sat, Jun 27, 2009 at 3:02 PM, H.Merijn Brand<> wrote:
> On Sat, 27 Jun 2009 13:44:38 -0500, "Craig A. Berry"
> <> wrote:
>> On Sat, Jun 27, 2009 at 12:23 PM, Dave Mitchell<> 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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About