515 - Optional pre-commit hooks for whitespace consistency

When multiple developers commit to a shared repo, accidental inconsistencies in whitespace and line endings can be introduced by different factors including the different editors and editor setting the authors use.

Some optional pre-commit hooks could be used to help prevent these accidental inconsistencies from being introduced. A starting example hooks could check for svn:eol-style in svn repos or check that all line endings are \n instead of \r\n in git repos on certain file types. A more complex hook could check that files end in a newline (keeps you from ever seeing that ugly '\ No newline at end of file
' in a diff), there is no trailing whitespace before a newline, and spaces are not used before tabs in indentation. These could all be individual options on a web interface or come as an all or nothing option.

User When Change
Torhal Jul 24, 2013 at 19:52 UTC Changed status from Accepted to Declined
Torhal Nov 09, 2011 at 17:17 UTC Changed status from New to Accepted
Torhal Jun 03, 2011 at 16:58 UTC Changed assigned to from None to prencher
Ackis May 05, 2009 at 16:36 UTC Changed component from None to Component #18
Arrowmaster Aug 11, 2008 at 20:47 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • Avatar of profalbert profalbert Jun 01, 2009 at 09:41 UTC - 0 likes

    @spaces/tabs as indention: Actually I think in shared repositories, using tabs for indention is discouraged because tab-width depends on the editor used.

  • Avatar of anmoch anmoch Aug 12, 2008 at 12:38 UTC - 0 likes

    In Git we could also check that only annotated tags are pushed.



Last updated
Jul 24, 2013
Aug 11, 2008
Declined - We decided not to take action on this ticket.
Enhancement - A change which is intended to better the project in some way
Low - Might slip to a later milestone.

Reported by

Possible assignees