delete static method

void delete({
  1. required Repository repo,
  2. required Oid annotatedOid,
  3. required Signature author,
  4. required Signature committer,
  5. String notesRef = 'refs/notes/commits',
})

Deletes the note for an annotatedOid.

repo is the repository where the note lives. annotatedOid is the Oid of the git object to remove the note from. author is the signature of the note's commit author. committer is the signature of the note's commit committer. notesRef is the canonical name of the reference to use. Defaults to "refs/notes/commits".

Throws a LibGit2Error if:

  • The repository is invalid
  • The notes reference is invalid
  • The note does not exist
  • Memory allocation fails

Implementation

static void delete({
  required Repository repo,
  required Oid annotatedOid,
  required Signature author,
  required Signature committer,
  String notesRef = 'refs/notes/commits',
}) {
  bindings.delete(
    repoPointer: repo.pointer,
    notesRef: notesRef,
    authorPointer: author.pointer,
    committerPointer: committer.pointer,
    oidPointer: annotatedOid.pointer,
  );
}