Skip to content

Commit aeee140

Browse files
LemmingAvalanchegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Kristoffer Haugsbakk <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a2e9dbb commit aeee140

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

notes.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,17 @@ void free_notes(struct notes_tree *t);
256256
struct string_list;
257257

258258
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+
*/
259264
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+
*/
260270
struct string_list extra_notes_refs;
261271
};
262272

@@ -283,15 +293,7 @@ void disable_display_notes(struct display_notes_opt *opt, int *show_notes);
283293
/*
284294
* Load the notes machinery for displaying several notes trees.
285295
*
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.
295297
*/
296298
void load_display_notes(struct display_notes_opt *opt);
297299

0 commit comments

Comments
 (0)