class documentation

High-level interface for Git notes operations.

Method __init__ Initialize Notes.
Method get_note Get the note for an object.
Method get_notes_ref Get the notes reference to use.
Method list_notes List all notes in a notes ref.
Method remove_note Remove a note for an object.
Method set_note Set or update a note for an object.
Instance Variable _object_store Undocumented
Instance Variable _refs Undocumented
def __init__(self, object_store: BaseObjectStore, refs_container: RefsContainer):

Initialize Notes.

Parameters
object_store:BaseObjectStoreObject store to read/write objects
refs_container:RefsContainerRefs container to read/write refs
def get_note(self, object_sha: bytes, notes_ref: bytes | None = None, config: StackedConfig | None = None) -> bytes | None:

Get the note for an object.

Parameters
object_sha:bytesSHA of the object to get notes for
notes_ref:bytes | NoneThe notes ref to use, or None to use the default
config:StackedConfig | NoneConfig to read notes.displayRef from
Returns
bytes | NoneThe note content as bytes, or None if no note exists
def get_notes_ref(self, notes_ref: bytes | None = None, config: StackedConfig | None = None) -> Ref:

Get the notes reference to use.

Parameters
notes_ref:bytes | NoneThe notes ref to use, or None to use the default
config:StackedConfig | NoneConfig to read notes.displayRef from
Returns
RefThe notes reference name
def list_notes(self, notes_ref: bytes | None = None, config: StackedConfig | None = None) -> list[tuple[ObjectID, bytes]]:

List all notes in a notes ref.

Parameters
notes_ref:bytes | NoneThe notes ref to use, or None to use the default
config:StackedConfig | NoneConfig to read notes.displayRef from
Returns
list[tuple[ObjectID, bytes]]List of tuples of (object_sha, note_content)
def remove_note(self, object_sha: bytes, notes_ref: bytes | None = None, author: bytes | None = None, committer: bytes | None = None, message: bytes | None = None, config: StackedConfig | None = None) -> bytes | None:

Remove a note for an object.

Parameters
object_sha:bytesSHA of the object to remove notes from
notes_ref:bytes | NoneThe notes ref to use, or None to use the default
author:bytes | NoneAuthor identity (defaults to committer)
committer:bytes | NoneCommitter identity (defaults to config)
message:bytes | NoneCommit message for the notes removal
config:StackedConfig | NoneConfig to read user identity and notes.displayRef from
Returns
bytes | NoneSHA of the new notes commit, or None if no note existed
def set_note(self, object_sha: bytes, note_content: bytes, notes_ref: bytes | None = None, author: bytes | None = None, committer: bytes | None = None, message: bytes | None = None, config: StackedConfig | None = None) -> bytes:

Set or update a note for an object.

Parameters
object_sha:bytesSHA of the object to annotate
note_content:bytesContent of the note
notes_ref:bytes | NoneThe notes ref to use, or None to use the default
author:bytes | NoneAuthor identity (defaults to committer)
committer:bytes | NoneCommitter identity (defaults to config)
message:bytes | NoneCommit message for the notes update
config:StackedConfig | NoneConfig to read user identity and notes.displayRef from
Returns
bytesSHA of the new notes commit
_object_store =

Undocumented

_refs =

Undocumented