MCPcopy Create free account
hub / github.com/BillHuang2001/evogit / append_note

Function append_note

python-impl/evogit/utils/git.py:299–311  ·  view source on GitHub ↗

Append a note to the current commit.

(config: EvoGitConfig, commit: str, note: str | bytes)

Source from the content-addressed store, hash-verified

297
298
299def 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
314def read_note(config: EvoGitConfig, commit: Optional[str]) -> Optional[str]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected