Note class

A class representing a Git note.

Git notes are annotations that can be attached to any Git object (commits, trees, blobs, etc.). They are stored in a separate ref namespace (default: refs/notes/commits) and can be used to add additional information to objects without modifying the objects themselves.

Notes are mutable and can be updated or deleted. Each note is associated with a specific Git object through its OID.

Annotations
  • @immutable

Constructors

Note.lookup({required Repository repo, required Oid annotatedOid, String notesRef = 'refs/notes/commits'})
Lookups the note for an annotatedOid.

Properties

annotatedOid Oid
The Oid of the git object being annotated by this note.
no setter
hashCode int
The hash code for this object.
no setterinherited
message String
The message content of this note.
no setter
oid Oid
The Oid of this note object.
no setter
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited

Methods

free() → void
Releases memory allocated for note object.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

create({required Repository repo, required Signature author, required Signature committer, required Oid annotatedOid, required String note, String notesRef = 'refs/notes/commits', bool force = false}) Oid
Creates a note for an annotatedOid.
delete({required Repository repo, required Oid annotatedOid, required Signature author, required Signature committer, String notesRef = 'refs/notes/commits'}) → void
Deletes the note for an annotatedOid.
list(Repository repo, {String notesRef = 'refs/notes/commits'}) List<Note>
Returns list of notes for repository.