Add simple identify command

This commit is contained in:
Chris Kuehl 2015-11-01 01:05:39 -07:00 committed by Chris Kuehl
parent 81b66cda74
commit f66ea8d546
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,8 @@
from pre_commit import git
from pre_commit.file_classifier.classifier import classify
def identify(args):
# TODO: more useful output
# TODO: check whether file is in git repo first?
print(classify(args.path, git.guess_git_type_for_file(args.path)))