From e6e230eeae0f3cb46c4c356e6cd0a0f1119a2a83 Mon Sep 17 00:00:00 2001 From: Denton Liu Date: Mon, 9 Dec 2019 05:10:41 -0800 Subject: notes: create init_display_notes() helper We currently open code the initialization for revs->notes_opt. Abstract this away into a helper function so that the logic can be reused in a future commit. This is slightly wasteful as we memset the struct twice but this is only run once so it shouldn't have any major effect. Signed-off-by: Denton Liu Signed-off-by: Junio C Hamano --- notes.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'notes.h') diff --git a/notes.h b/notes.h index 1ce528442a..c0b712371c 100644 --- a/notes.h +++ b/notes.h @@ -260,6 +260,11 @@ struct display_notes_opt { struct string_list extra_notes_refs; }; +/* + * Initialize a display_notes_opt to its default value. + */ +void init_display_notes(struct display_notes_opt *opt); + /* * Load the notes machinery for displaying several notes trees. * -- cgit v1.2.3