[asdf-devel] tab-blocking commit hook
Stelian Ionescu
sionescu at cddr.org
Tue Jan 12 03:43:52 UTC 2010
On Wed, 2009-12-23 at 23:38 -0500, dherring at tentpost.com wrote:
> 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
> ""
I've attached a slightly modified version that also checks for spaces at
the end of a line and only on added/modified lines, not in the context
of the patch
>
> 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.
good idea
--
Stelian Ionescu a.k.a. fe[nl]ix
Quidquid latine dictum sit, altum videtur.
http://common-lisp.net/project/iolib
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pre-commit
Type: application/x-shellscript
Size: 1155 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20100112/ac5a03a9/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <https://mailman.common-lisp.net/pipermail/asdf-devel/attachments/20100112/ac5a03a9/attachment.sig>
More information about the asdf-devel
mailing list