Making it possible to invoke pre-commit run --files some.file from a subdirectory of the repository

This commit is contained in:
Lucas Cimon 2016-02-03 09:03:59 +01:00
parent 894862462d
commit df8102f57d
4 changed files with 72 additions and 29 deletions

View file

@ -24,7 +24,7 @@ class Runner(object):
def create(cls):
"""Creates a PreCommitRunner by doing the following:
- Finds the root of the current git repository
- chdirs to that directory
- chdir to that directory
"""
root = git.get_root()
os.chdir(root)