[MLton] Tabs in source files

Stephen Weeks MLton@mlton.org
Sat, 20 Aug 2005 17:36:31 -0700


> > a) reject a commit with tabs or b) fix a commit with tabs.
...
> I would probably go with option b + notification of some sort.

My preference is option "a".  I've made an attempt at implementing
this via an svn "pre-commit" hook script.  I don't think option b is
possible with svn, since hook scripts are not allowed to modify the
transaction.  From the manual:

  Do not attempt to modify the transaction using hook scripts.
  ...
  Instead of attempting to modify the transaction, it is much better
  to check the transaction in the pre-commit hook and reject the
  commit if it does not meet the desired requirements.

The tab pre-commit check only runs on the file suffixes I mentioned
earlier.  Unsuffixed files are not checked.  Suggestions on the best
way to do this are appreciated.  We could use an svn property, either
to indicate that tabs should be allowed, or that they should not.  Or
we could simply ignore the issue for unsuffixed files.