]> git.ipfire.org Git - thirdparty/git.git/blobdiff - notes.h
list-objects-filter-options: fix function name in BUG
[thirdparty/git.git] / notes.h
diff --git a/notes.h b/notes.h
index a476bfa06659a9d6c8bc12538f150cde06898b86..c1682c39a97bf6d84940b64b353286dfb91282a3 100644 (file)
--- a/notes.h
+++ b/notes.h
@@ -266,14 +266,19 @@ struct display_notes_opt {
 void init_display_notes(struct display_notes_opt *opt);
 
 /*
- * Set a display_notes_opt to a given state. 'show_notes' is a boolean
- * representing whether or not to show notes. 'opt_ref' points to a
- * string for the notes ref, or is NULL if the default notes should be
- * used.
- *
- * Return 'show_notes' normalized to 1 or 0.
+ * This family of functions enables or disables the display of notes. In
+ * particular, 'enable_default_display_notes' will display the default notes,
+ * 'enable_ref_display_notes' will display the notes ref 'ref' and
+ * 'disable_display_notes' will disable notes, including those added by previous
+ * invocations of the 'enable_*_display_notes' functions.
+ *
+ * 'show_notes' is a pointer to a boolean which will be set to 1 if notes are
+ * displayed, else 0. It must not be NULL.
  */
-int set_display_notes(struct display_notes_opt *opt, int show_notes, const char *opt_ref);
+void enable_default_display_notes(struct display_notes_opt *opt, int *show_notes);
+void enable_ref_display_notes(struct display_notes_opt *opt, int *show_notes,
+               const char *ref);
+void disable_display_notes(struct display_notes_opt *opt, int *show_notes);
 
 /*
  * Load the notes machinery for displaying several notes trees.
@@ -291,12 +296,10 @@ void load_display_notes(struct display_notes_opt *opt);
 
 /*
  * Append notes for the given 'object_sha1' from all trees set up by
- * load_display_notes() to 'sb'.  The 'flags' are a bitwise
- * combination of
- *
- * - NOTES_SHOW_HEADER: add a 'Notes (refname):' header
+ * load_display_notes() to 'sb'.
  *
- * - NOTES_INDENT: indent the notes by 4 places
+ * If 'raw' is false the note will be indented by 4 places and
+ * a 'Notes (refname):' header added.
  *
  * You *must* call load_display_notes() before using this function.
  */