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 <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Denton Liu
2019-12-09 05:10:41 -08:00
committed by Junio C Hamano
parent 1e6ed5441a
commit e6e230eeae
3 changed files with 12 additions and 1 deletions

View File

@@ -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.
*