mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-05-01 04:39:15 -05:00
Implement our own rev-parse --top-level
This commit is contained in:
@@ -10,6 +10,7 @@ from pre_commit import git
|
||||
def get_pre_commit_dir_path():
|
||||
return os.path.join(git.get_root(), C.HOOKS_WORKSPACE)
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def in_hooks_workspace():
|
||||
"""Change into the hooks workspace. If it does not exist create it."""
|
||||
|
||||
Reference in New Issue
Block a user