(tempdir_factory)
| 97 | |
| 98 | @pytest.fixture |
| 99 | def 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 |
nothing calls this directly
no test coverage detected