On Wed, 2009-12-23 at 23:38 -0500, [email protected] 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
pre-commit
Description: application/shellscript
signature.asc
Description: This is a digitally signed message part
_______________________________________________ asdf-devel mailing list [email protected] http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
