mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-16 10:31:46 +04:00
mounting the superproject directory
This commit is contained in:
parent
69709798c6
commit
b30df02920
2 changed files with 8 additions and 5 deletions
|
|
@ -40,10 +40,12 @@ def get_root():
|
||||||
|
|
||||||
|
|
||||||
def get_superproject_root():
|
def get_superproject_root():
|
||||||
stdout = cmd_output('git',
|
stdout = cmd_output(
|
||||||
'rev-parse',
|
'git',
|
||||||
'--show-superproject-working-tree',
|
'rev-parse',
|
||||||
'--show-toplevel')
|
'--show-superproject-working-tree',
|
||||||
|
'--show-toplevel',
|
||||||
|
)
|
||||||
return stdout[1].splitlines()[0].strip()
|
return stdout[1].splitlines()[0].strip()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ import hashlib
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pre_commit.constants as C
|
import pre_commit.constants as C
|
||||||
from pre_commit import five, git
|
from pre_commit import five
|
||||||
|
from pre_commit import git
|
||||||
from pre_commit.languages import helpers
|
from pre_commit.languages import helpers
|
||||||
from pre_commit.util import CalledProcessError
|
from pre_commit.util import CalledProcessError
|
||||||
from pre_commit.util import clean_path_on_failure
|
from pre_commit.util import clean_path_on_failure
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue