[asdf-devel] tab-blocking commit hook

dherring at tentpost.com dherring at tentpost.com
Thu Dec 24 04:38:18 UTC 2009


The attached script should prevent tabs in *.asd, *.lisp, or *.script
files from being committed to a git repository.  Existing tabs will not be
affected, unless they appear in (the context of) another modification.

Here's an example stopped commit.
""
Error: This git repository disallows the #\Tab character in lisp files.
Only spaces should be used for indenting lisp code.
In emacs, 'M-x untabify' and (setq indent-tabs-mode nil) may help.

First offending file and lines:
test.asd
+	this is a tab
""

To install, simply copy this script to .git/hooks/pre-commit and set the
executable bit.

It might also be good to put a copy somewhere permanent so others can
install it to their local repositories.

Later,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pre-commit
Type: application/octet-stream
Size: 952 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20091223/95acba0e/attachment.obj>


More information about the asdf-devel mailing list