commit | c682b5074963e7c7e25040542ec62243e8d38a2a | [log] [tgz] |
---|---|---|
author | gkisel <gkisel@truecar.com> | Wed Jan 07 14:07:32 2015 -0800 |
committer | gkisel <gkisel@truecar.com> | Mon Jan 12 15:38:22 2015 -0800 |
tree | 42876cb9b4ae091afcc6d973c496afa9d95916e2 | |
parent | b08f834d65fed15e25cbe3073df7ff457459801a [diff] [blame] |
Add check_case_conflict hook #21
diff --git a/pre_commit_hooks/util.py b/pre_commit_hooks/util.py new file mode 100644 index 0000000..eedf7b6 --- /dev/null +++ b/pre_commit_hooks/util.py
@@ -0,0 +1,11 @@ +from __future__ import absolute_import +from __future__ import print_function +from __future__ import unicode_literals + +from plumbum import local + + +def added_files(): + return set(local['git']( + 'diff', '--staged', '--name-only', '--diff-filter', 'A', + ).splitlines())