mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 16:24:40 +04:00
Making it possible to invoke pre-commit run --files some.file from a subdirectory of the repository
This commit is contained in:
parent
894862462d
commit
941149942d
3 changed files with 11 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue