Skip to main content

write_notes

Function write_notes 

Source
pub fn write_notes(
    git_dir: &Path,
    format: ObjectFormat,
    store: &FileRefStore,
    notes_ref: &NotesRef,
    notes: &[Note],
    message: &str,
    identity: &NotesCommitIdentity,
    ref_expected: Option<RefTarget>,
) -> Result<()>
Expand description

Rewrite the notes tree to exactly notes and advance notes_ref to a new commit. An empty set still records a commit on the empty tree.

ref_expected is the compare-and-swap precondition on the notes ref: None means the ref must not exist; Some means it must point at that oid. Use notes_ref_expected for legacy auto-detection.