pub fn write_notes_commit(
repo: &Repository,
notes_ref: &str,
entries: &[NotesTreeEntry],
message: &str,
) -> Result<()>Expand description
Write a new notes tree and commit, updating the notes ref.
Author and committer come from GIT_{AUTHOR,COMMITTER}_{NAME,EMAIL,DATE} and user.*
config, timestamped with the repository’s wall clock. Use
RepositoryNotes to pass explicit identities.
entries replace the whole notes tree. The commit’s parent and the compare-and-swap value
are the tip read here, so an update made after the caller read entries but before this call
is overwritten; RepositoryNotes reads and writes
against one tip and rejects such races.
§Errors
- Ref store errors, including a compare-and-swap failure when
notes_refmoves while the commit is written. - Object write and config load failures.