(subject: str, tmp_path: Path)
| 37 | |
| 38 | |
| 39 | def _run_commit_msg(subject: str, tmp_path: Path) -> subprocess.CompletedProcess: |
| 40 | msg_file = tmp_path / "COMMIT_EDITMSG" |
| 41 | msg_file.write_text(subject + "\n", encoding="utf-8") |
| 42 | return subprocess.run( |
| 43 | ["bash", str(_COMMIT_MSG_HOOK), str(msg_file)], |
| 44 | capture_output=True, |
| 45 | text=True, |
| 46 | check=False, |
| 47 | ) |
| 48 | |
| 49 | |
| 50 | # ----- commit-msg ----------------------------------------------------------- |
no test coverage detected