<div dir="ltr">This seems acceptable IMO. The general working conventions already are to separate whitespace and/or tab changes from a commit containing actual content. If you ./validate cleanly, but the server rejects the push for whitespace, adding an extra commit on top to clean up the affected files seems very sensible (it&#39;s simple to &#39;untabify&#39; and eliminate trailing white space in most editors these days, so I imagine this isn&#39;t really going to cost you a lot of time.) I also add bonus points for the fact the server will reject it unless you clean up *all* affected files you touched, so things can&#39;t slip by. This is how the tab check works now, and it does deal with a &#39;range&#39; of commits where later commits eliminate tabs introduced in earlier ones.<div>
<br></div><div>We&#39;d also have to introduce the concept of git into ./validate for this to work (and add the ability to specify a commit range for stuff like this,) but a basic implementation may not be difficult, looking at the pre-receive script.</div>
<div><br></div><div>Alternatively, these could be pre-commit hooks in the developer repository, but I believe you have to opt into that. Maybe worth putting on the wiki, though.</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Thu, Aug 22, 2013 at 2:33 AM, Simon Marlow <span dir="ltr">&lt;<a href="mailto:marlowsd@gmail.com" target="_blank">marlowsd@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 20/08/13 12:21, Geoffrey Mainland wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Would be nice to have. How about a third hook that disallows commits<br>
that include whitespace-only changes unless *all* changes are<br>
whitespace-only? ;)<br>
</blockquote>
<br></div>
The problem with these kind of commit-time checks is that you only find out the problem *after* you&#39;ve validated your nicely polished commits. If we&#39;re going to add more checks on commits they should be done by validate (yes I know that&#39;s not at all trivial, but it&#39;s not impossible either).<br>

<br>
Cheers,<br>
        Simon<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Geoff<br>
<br>
On 08/20/2013 10:59 AM, Jan Stolarek wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Right now we have a git hook that prevents pushing a file containing tabs, unless that file had them already (in other words: no new files with tabs in our repos). I propose to add similar hook for trailing whitespaces. Herbert says he can implement that. What do others think? Would you find that useful or problematic?<br>

<br>
Janek<br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/ghc-devs</a><br>
<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/ghc-devs" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/ghc-devs</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Regards,<br>Austin - PGP: 4096R/0x91384671</div>
</div>