notes: move the documentation to the struct
Its better to document the struct members directly instead of on a function that takes a pointer to the struct. This will also make it easier to update the documentation in the future. Make adjustments for this new context. Also drop “may contain” since we don’t need to emphasize that a list could be empty. Suggested-by: Jeff King <peff@peff.net> Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Kristoffer Haugsbakk committed
Jun 5, 2023 at 12:05 UTC
aeee1408ce98f0527d9d22c3aee96360f341443b
1 file changed
+11
-9
notes.h
+11
-9
@@ -256,7 +256,17 @@ void free_notes(struct notes_tree *t);
256
struct string_list;
257
258
struct display_notes_opt {
259
+ /*
260
+ * Less than `0` is "unset", which means that the default notes
261
+ * are shown iff no other notes are given. Otherwise,
262
+ * treat it like a boolean.
263
+ */
264
int use_default_notes;
265
+
266
+ /*
267
+ * A list of globs (in the same style as notes.displayRef) where
268
+ * notes should be loaded from.
269
+ */
270
struct string_list extra_notes_refs;
271
};
272
@@ -283,15 +293,7 @@ void disable_display_notes(struct display_notes_opt *opt, int *show_notes);
293
/*
294
* Load the notes machinery for displaying several notes trees.
295
*
286
- * If 'opt' is not NULL, then it specifies additional settings for the
287
- * displaying:
288
- *
289
- * - use_default_notes: less than `0` is "unset", which means that the
290
- * default notes are shown iff no other notes are given. Otherwise,
291
- * treat it like a boolean.
292
- *
293
- * - extra_notes_refs may contain a list of globs (in the same style
294
- * as notes.displayRef) where notes should be loaded from.
296
+ * 'opt' may be NULL.
297
*/
298
void load_display_notes(struct display_notes_opt *opt);
299