| Conditions | 2 |
| Total Lines | 7 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import subprocess |
||
| 14 | def git_commit(message: str) -> None: |
||
| 15 | """Invoke git commit, allowing user to edit""" |
||
| 16 | with tempfile.NamedTemporaryFile(mode="w+t", delete=True) as f: |
||
| 17 | f.write(message) |
||
| 18 | f.seek(0) |
||
| 19 | args = ["git", "commit", "--allow-empty", "--template", f.name] |
||
| 20 | subprocess.run(args, check=True) |
||
| 21 | |||
| 31 |