Re: [frogs] Patch for Issue #830

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]



Graham Percival wrote Monday, December 21, 2009 3:18 PM


On Mon, Dec 21, 2009 at 3:08 PM, Trevor Daniels <t.daniels@xxxxxxxxxxx> 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?

http://stackoverflow.com/questions/591923/make-git-automatically-remove-trailing-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.

http://stubbisms.wordpress.com/2008/07/30/git-rebase-svn-and-whitespace/

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.

Trevor





---
----
Join the Frogs!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/