[Top][All Lists]

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

Re: [frogs] Patch for Issue #830

From: Carl Sorensen
Subject: Re: [frogs] Patch for Issue #830
Date: Mon, 21 Dec 2009 09:10:02 -0700

On 12/21/09 8:51 AM, "Trevor Daniels" <address@hidden> wrote:

> Graham Percival wrote Monday, December 21, 2009 3:18 PM
>> On Mon, Dec 21, 2009 at 3:08 PM, Trevor Daniels
>> <address@hidden> wrote:
>>> Graham Percival wrote Monday, December 21, 2009 2:46 PM
>>>>>>> git rebase --whitespace=fix master mymods
>>>> If git
>>>> can be configured to automatically fix whitespaces, then I'll
>>>> copy&paste the command and then stop pushing commits that add
>>>> whitespace errors.
>>> As far as I know it can't.
>> What are these webpage about?
>> ing-whitespace-before-committing
> Well, mainly to tell you that the two commands
> don't remove whitespace:
> 'Those settings (core.whitespace and apply.whitespace)
> are not there to remove trailing whitespace but to:
> .core.whitespace: detect them, and raise errors
> .apply.whitespace: and strip them, but only during
> patch, not "always automatically" '
> It suggests using a pre-commit hook, but the
> default only checks for trailing space, it doesn't
> fix it.  There is some discussion about rewriting
> the pre-commit hook, but this looks very scary.
> Certainly way beyond me.
> This one seems to be about someone struggling
> with white-space issues; there are no solutions.
>> The apply.whitespace  looks promising for my
>>  git am 0001-blah
> For git am simply use the --whitespace=fix option.
>> commands.  And "git hook pre-commit" sounds like a great candidate
>> for
>> having this done before the patch is even made.
> No, it only warns.  Might still be useful I
> suppose.

There is a link down lower on the page where somebody has written a custom
git hook pre-commit that removes trailing whitespace in the commit, but
the final comment seems to imply that it doesn't work.

Since it's easy enough to remove the whitespace when we apply the patch.
Let's just add the --whitespce=fix option to our recommended git-am and git
apply commands.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]