Notes API: get_commit_notes() -> format_note() + remove the commit restriction
[gitweb.git] / notes.h
diff --git a/notes.h b/notes.h
index a1421e351ae0a6f97824b150140e49ddd5d3414d..d745ed12da5a412c78d7e97a65b66210930ae976 100644 (file)
--- a/notes.h
+++ b/notes.h
@@ -4,10 +4,19 @@
 /* Free (and de-initialize) the internal notes tree structure */
 void free_notes(void);
 
+/* Flags controlling how notes are formatted */
 #define NOTES_SHOW_HEADER 1
 #define NOTES_INDENT 2
 
-void get_commit_notes(const struct commit *commit, struct strbuf *sb,
+/*
+ * Fill the given strbuf with the notes associated with the given object.
+ *
+ * If the internal notes structure is not initialized, it will be auto-
+ * initialized to the default value (see documentation for init_notes() above).
+ *
+ * 'flags' is a bitwise combination of the above formatting flags.
+ */
+void format_note(const unsigned char *object_sha1, struct strbuf *sb,
                const char *output_encoding, int flags);
 
 #endif