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 committed by Anthony Sottile
parent 894862462d
commit 941149942d
3 changed files with 11 additions and 3 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)