Testing pre-commit script.
authorJose A. Rivera <jarrpa@redhat.com>
Thu, 24 May 2012 20:19:55 +0000 (15:19 -0500)
committerJose A. Rivera <jarrpa@redhat.com>
Thu, 24 May 2012 20:19:55 +0000 (15:19 -0500)
scripts/git_keywords.py

index 161dfc8108df5360df6975943aee6ded60836c95..fb1f7f96744b0f2972eada1afc80fa90e365b839 100755 (executable)
@@ -4,7 +4,7 @@
 #
 # $Copyright (C) 2012 Jose A. Rivera <jarrpa@redhat.com>$
 #
-# $Date: 2012-05-24 14:25:54 -0500 UTC$
+# $Date: 2012-05-24 15:19:55 -0500 UTC$
 #
 # ---------------------------------------------------------------------------- #
 #
@@ -113,7 +113,7 @@ def main():
   for file in git('diff-index --cached --diff-filter=ACMRTUX ' + \
                   '--name-only HEAD').split('\n'):
     mime = mimetypes.guess_type(file)
-    if mime[0] in [ None, 'text' ] and \
+    if (mime[0] is None or 'text' in mime[0]) and \
        git('check-attr kw_sub ' + file).split(': ')[2] == 'true':
       files = files + [file]
   for file in files: