Append a note to the current commit.
(config: EvoGitConfig, commit: str, note: str | bytes)
| 297 | |
| 298 | |
| 299 | def append_note(config: EvoGitConfig, commit: str, note: str | bytes) -> None: |
| 300 | """Append a note to the current commit.""" |
| 301 | if isinstance(note, str): |
| 302 | note = note.encode("utf-8") |
| 303 | |
| 304 | subprocess.run( |
| 305 | ["git", "notes", "append", "-"], |
| 306 | cwd=config.git_dir, |
| 307 | input=note, |
| 308 | check=True, |
| 309 | stdout=subprocess.DEVNULL, |
| 310 | stderr=subprocess.DEVNULL, |
| 311 | ) |
| 312 | |
| 313 | |
| 314 | def read_note(config: EvoGitConfig, commit: Optional[str]) -> Optional[str]: |
nothing calls this directly
no outgoing calls
no test coverage detected