diff options
| author | Richard Ipsum <richardipsum@fastmail.co.uk> | 2017-03-15 11:54:45 +0000 |
|---|---|---|
| committer | Richard Ipsum <richardipsum@fastmail.co.uk> | 2017-10-07 00:33:23 +0100 |
| commit | 7096bf1ef6b5c7c5659ea9d8c66c85bda8ef20db (patch) | |
| tree | fcdc597c361623f78e3913b07eb9910ec35c0362 /include/git2/notes.h | |
| parent | a46e743d0153b9a565614776b9f3a71e0aebff25 (diff) | |
| download | libgit2-7096bf1ef6b5c7c5659ea9d8c66c85bda8ef20db.tar.gz | |
notes: Add git_note_commit_read
This also adds tests for this function.
Diffstat (limited to 'include/git2/notes.h')
| -rw-r--r-- | include/git2/notes.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/git2/notes.h b/include/git2/notes.h index 1af43a89b..c6b2d9594 100644 --- a/include/git2/notes.h +++ b/include/git2/notes.h @@ -94,6 +94,25 @@ GIT_EXTERN(int) git_note_read( const char *notes_ref, const git_oid *oid); + +/** + * Read the note for an object from a note commit + * + * The note must be freed manually by the user. + * + * @param out pointer to the read note; NULL in case of error + * @param repo repository where to look up the note + * @param notes_commit a pointer to the notes commit object + * @param oid OID of the git object to read the note from + * + * @return 0 or an error code + */ +GIT_EXTERN(int) git_note_commit_read( + git_note **out, + git_repository *repo, + git_commit *notes_commit, + const git_oid *oid); + /** * Get the note author * |
