mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 09:04:41 +04:00
Add pre-commit try-repo
`try-repo` is useful for: - Trying out a remote hook repository without needing to configure it. - Testing a hook repository while developing it.
This commit is contained in:
parent
e8641ee0a3
commit
2c88791a7f
15 changed files with 254 additions and 110 deletions
|
|
@ -6,11 +6,11 @@ import tarfile
|
|||
|
||||
import pytest
|
||||
|
||||
from pre_commit import git
|
||||
from pre_commit import make_archives
|
||||
from pre_commit.util import cmd_output
|
||||
from pre_commit.util import cwd
|
||||
from testing.fixtures import git_dir
|
||||
from testing.util import get_head_sha
|
||||
from testing.util import skipif_slowtests_false
|
||||
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ def test_make_archive(tempdir_factory):
|
|||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'foo')
|
||||
# We'll use this sha
|
||||
head_sha = get_head_sha('.')
|
||||
head_sha = git.head_sha('.')
|
||||
# And check that this file doesn't exist
|
||||
open('bar', 'a').close()
|
||||
cmd_output('git', 'add', '.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue