]> git.ipfire.org Git - thirdparty/git.git/blobdiff - notes.c
notes: create init_display_notes() helper
[thirdparty/git.git] / notes.c
diff --git a/notes.c b/notes.c
index be72780a8f3bb5c28341b0125c06caa513ec1488..53d1e7767ce459e53aa4ffeae129672d599d1859 100644 (file)
--- a/notes.c
+++ b/notes.c
@@ -988,7 +988,7 @@ void init_notes(struct notes_tree *t, const char *notes_ref,
                combine_notes_fn combine_notes, int flags)
 {
        struct object_id oid, object_oid;
-       unsigned mode;
+       unsigned short mode;
        struct leaf_node root_tree;
 
        if (!t)
@@ -1040,6 +1040,12 @@ struct notes_tree **load_notes_trees(struct string_list *refs, int flags)
 }
 
 void init_display_notes(struct display_notes_opt *opt)
+{
+       memset(opt, 0, sizeof(*opt));
+       opt->use_default_notes = -1;
+}
+
+void load_display_notes(struct display_notes_opt *opt)
 {
        char *display_ref_env;
        int load_config_refs = 0;