<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I like Alexander's idea, but there's a subtle problem with it: Any sizeable change to one file requires (at least) small changes in several other files. Say X.hs has tabs. If I make a one-line change to X.hs, and you're in the middle of massive changes to X.hs, and I detab X.hs in the course of committing my one-line change, you have a bad merge in your future.</div><div><br></div><div>So, my suggestion would be to do what Alexander suggests, but essentially to make the error into a warning. When committing a file with tabs, the hook can report a list of all files containing tabs in them, encouraging the committer to detab any files they have made significant changes to. The commit would still go through, though. Then, after 6 months of that, we can change the warning into a proper error and/or do a massive full-sweep detabbing.</div><div><br></div><div>Richard</div><br><div><div>On Jan 18, 2013, at 8:03 AM, Alexander Kjeldaas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Then it's even easier. Update the hook to reject all tabs in source code files, wait 6 months, and start detabbing the remaining files. Then the probability of conflict should be pretty low.<div><br></div>
<div style="">Alexander</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 18, 2013 at 1:46 PM, Jan Stolarek <span dir="ltr"><<a href="mailto:jan.stolarek@p.lodz.pl" target="_blank">jan.stolarek@p.lodz.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dnia piątek, 18 stycznia 2013, Alexander Kjeldaas napisał:<br>
<div class="im">> Well if this is true, then I think you could solve this simply by looking<br>
> for this in a git commit hook or some other hook.<br>
> <a href="http://stackoverflow.com/questions/3985463/prevent-pushes-to-git-containing" target="_blank">http://stackoverflow.com/questions/3985463/prevent-pushes-to-git-containing</a><br>
>-tabs-in-certain-files-e-g-cpp-h-cmakeli<br>
> <a href="https://github.com/mrc/git-hook-library" target="_blank">https://github.com/mrc/git-hook-library</a><br>
</div>There is already such a hook:<br>
<br>
"We'd like to move away from tabs in the long term, and so a git hook on <a href="http://darcs.haskell.org/" target="_blank">darcs.haskell.org</a> will<br>
reject series of commits that add tabs to a file that is currently tab-free. (Note that there are<br>
no restrictions on adding tabs to a file already containing them.)"<br>
<br>
From: <a href="http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces" target="_blank">http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces</a><br>
<br>
Janek<br>
</blockquote></div><br></div>
_______________________________________________<br>ghc-devs mailing list<br><a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>http://www.haskell.org/mailman/listinfo/ghc-devs<br></blockquote></div><br></body></html>