mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 16:44:42 +04:00
Don't fail if GPG signing is configured by default. All references.
This commit is contained in:
parent
7afb2944b2
commit
28c97a95cd
10 changed files with 60 additions and 50 deletions
|
|
@ -19,6 +19,7 @@ from testing.fixtures import git_dir
|
|||
from testing.fixtures import make_consuming_repo
|
||||
from testing.fixtures import write_config
|
||||
from testing.util import cwd
|
||||
from testing.util import git_commit
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
|
|
@ -79,7 +80,7 @@ def _make_conflict():
|
|||
with io.open('foo_only_file', 'w') as foo_only_file:
|
||||
foo_only_file.write('foo')
|
||||
cmd_output('git', 'add', 'foo_only_file')
|
||||
cmd_output('git', 'commit', '-m', 'conflict_file')
|
||||
git_commit('conflict_file')
|
||||
cmd_output('git', 'checkout', 'origin/master', '-b', 'bar')
|
||||
with io.open('conflict_file', 'w') as conflict_file:
|
||||
conflict_file.write('harp\nddrp\n')
|
||||
|
|
@ -87,7 +88,7 @@ def _make_conflict():
|
|||
with io.open('bar_only_file', 'w') as bar_only_file:
|
||||
bar_only_file.write('bar')
|
||||
cmd_output('git', 'add', 'bar_only_file')
|
||||
cmd_output('git', 'commit', '-m', 'conflict_file')
|
||||
git_commit('conflict_file')
|
||||
cmd_output('git', 'merge', 'foo', retcode=None)
|
||||
|
||||
|
||||
|
|
@ -96,7 +97,7 @@ def in_merge_conflict(tempdir_factory):
|
|||
path = make_consuming_repo(tempdir_factory, 'script_hooks_repo')
|
||||
open(os.path.join(path, 'dummy'), 'a').close()
|
||||
cmd_output('git', 'add', 'dummy', cwd=path)
|
||||
cmd_output('git', 'commit', '-m', 'Add config.', cwd=path)
|
||||
git_commit('Add config.', cwd=path)
|
||||
|
||||
conflict_path = tempdir_factory.get()
|
||||
cmd_output('git', 'clone', path, conflict_path)
|
||||
|
|
@ -109,7 +110,7 @@ def in_merge_conflict(tempdir_factory):
|
|||
def in_conflicting_submodule(tempdir_factory):
|
||||
git_dir_1 = git_dir(tempdir_factory)
|
||||
git_dir_2 = git_dir(tempdir_factory)
|
||||
cmd_output('git', 'commit', '--allow-empty', '-minit!', cwd=git_dir_2)
|
||||
git_commit('init!', cwd=git_dir_2)
|
||||
cmd_output('git', 'submodule', 'add', git_dir_2, 'sub', cwd=git_dir_1)
|
||||
with cwd(os.path.join(git_dir_1, 'sub')):
|
||||
_make_conflict()
|
||||
|
|
@ -135,7 +136,7 @@ def commit_msg_repo(tempdir_factory):
|
|||
write_config(path, config)
|
||||
with cwd(path):
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'add hooks')
|
||||
git_commit('add hooks')
|
||||
yield path
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue