summaryrefslogtreecommitdiff
path: root/include/git2/notes.h
diff options
context:
space:
mode:
authornulltoken <emeric.fermas@gmail.com>2012-05-16 21:21:24 +0200
committernulltoken <emeric.fermas@gmail.com>2012-05-16 21:51:45 +0200
commitee7680d53b7328020576813914ac739b66bb8f8d (patch)
tree4c8b7d51cc184226150f22c17a67137bcfaeafd0 /include/git2/notes.h
parent9d0011fd83ff38561e75667451d2b6a55320d7d4 (diff)
downloadlibgit2-ee7680d53b7328020576813914ac739b66bb8f8d.tar.gz
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.h13
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
);