mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-04-15 01:51:46 +04:00
Move get_head_sha into testing since it is only used by tests.
This commit is contained in:
parent
db6e1afc75
commit
94d626691f
5 changed files with 15 additions and 15 deletions
|
|
@ -6,11 +6,11 @@ import yaml
|
|||
from plumbum import local
|
||||
|
||||
import pre_commit.constants as C
|
||||
from pre_commit import git
|
||||
from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA
|
||||
from pre_commit.clientlib.validate_config import validate_config_extra
|
||||
from pre_commit.jsonschema_extensions import apply_defaults
|
||||
from testing.util import copy_tree_to_path
|
||||
from testing.util import get_head_sha
|
||||
from testing.util import get_resource_path
|
||||
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ def failing_hook_repo(dummy_git_repo):
|
|||
def _make_config(path, hook_id, file_regex):
|
||||
config = {
|
||||
'repo': path,
|
||||
'sha': git.get_head_sha(path),
|
||||
'sha': get_head_sha(path),
|
||||
'hooks': [{'id': hook_id, 'files': file_regex}],
|
||||
}
|
||||
config_wrapped = apply_defaults([config], CONFIG_JSON_SCHEMA)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue