libgit2

git_note_commit_create

Version:

Add a note for an object from a commit

This function will create a notes commit for a given object, the commit is a dangling commit, no reference is created.

Signature

int git_note_commit_create(git_oid *notes_commit_out, git_oid *notes_blob_out, git_repository *repo, git_commit *parent, const git_signature *author, const git_signature *committer, const git_oid *oid, const char *note, int allow_note_overwrite);

Parameters

In
notes_commit_out

pointer to store the commit (optional); NULL in case of error

In
notes_blob_out

a point to the id of a note blob (optional)

In
repo

repository where the note will live

In
parent

Pointer to parent note or NULL if this shall start a new notes tree

In
author

signature of the notes commit author

In
committer

signature of the notes commit committer

In
oid

OID of the git object to decorate

const char *
In
note

Content of the note to add for object oid

int
In
allow_note_overwrite

Overwrite existing note

Returns

int

0 or an error code

Versions