diff options
author | Vicent Martà <tanoku@gmail.com> | 2012-05-16 13:43:16 -0700 |
---|---|---|
committer | Vicent Martà <tanoku@gmail.com> | 2012-05-16 13:43:16 -0700 |
commit | 38f4f1582471cfff4ade558f321e946093a93c4c (patch) | |
tree | 4c8b7d51cc184226150f22c17a67137bcfaeafd0 /include/git2/notes.h | |
parent | 9d0011fd83ff38561e75667451d2b6a55320d7d4 (diff) | |
parent | ee7680d53b7328020576813914ac739b66bb8f8d (diff) | |
download | libgit2-38f4f1582471cfff4ade558f321e946093a93c4c.tar.gz |
Merge pull request #705 from nulltoken/fix/note_list_callback_signature
notes: make git_note_foreach() callback signature easier to cope with from a binding perspective
Diffstat (limited to 'include/git2/notes.h')
-rw-r--r-- | include/git2/notes.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/git2/notes.h b/include/git2/notes.h index 7b2ac1fa0..ece5b274d 100644 --- a/include/git2/notes.h +++ b/include/git2/notes.h @@ -103,6 +103,17 @@ GIT_EXTERN(void) git_note_free(git_note *note); GIT_EXTERN(int) git_note_default_ref(const char **out, git_repository *repo); /** + * Basic components of a note + * + * - Oid of the blob containing the message + * - Oid of the git object being annotated + */ +typedef struct { + git_oid blob_oid; + git_oid annotated_object_oid; +} git_note_data; + +/** * Loop over all the notes within a specified namespace * and issue a callback for each one. * @@ -119,7 +130,7 @@ GIT_EXTERN(int) git_note_default_ref(const char **out, git_repository *repo); GIT_EXTERN(int) git_note_foreach( git_repository *repo, const char *notes_ref, - int (*note_cb)(const git_oid *note_oid, const git_oid *annotated_object_oid, void *payload), + int (*note_cb)(git_note_data *note_data, void *payload), void *payload ); |