MCPcopy
hub / github.com/pre-commit/pre-commit / commit_msg_repo

Function commit_msg_repo

tests/conftest.py:99–115  ·  view source on GitHub ↗
(tempdir_factory)

Source from the content-addressed store, hash-verified

97
98@pytest.fixture
99def commit_msg_repo(tempdir_factory):
100 path = git_dir(tempdir_factory)
101 config = {
102 'repo': 'local',
103 'hooks': [{
104 'id': 'must-have-signoff',
105 'name': 'Must have "Signed off by:"',
106 'entry': 'grep -q "Signed off by:"',
107 'language': 'system',
108 'stages': ['commit-msg'],
109 }],
110 }
111 write_config(path, config)
112 with cwd(path):
113 cmd_output('git', 'add', '.')
114 git_commit(msg=commit_msg_repo.__name__)
115 yield path
116
117
118@pytest.fixture

Callers

nothing calls this directly

Calls 5

git_dirFunction · 0.90
write_configFunction · 0.90
cwdFunction · 0.90
cmd_outputFunction · 0.90
git_commitFunction · 0.90

Tested by

no test coverage detected