MCPcopy Index your code
hub / github.com/git/git / load_display_notes

Function load_display_notes

notes.c:1110–1141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1108}
1109
1110void load_display_notes(struct display_notes_opt *opt)
1111{
1112 char *display_ref_env;
1113 int load_config_refs = 0;
1114 display_notes_refs.strdup_strings = 1;
1115
1116 assert(!display_notes_trees);
1117
1118 if (!opt || opt->use_default_notes > 0 ||
1119 (opt->use_default_notes == -1 && !opt->extra_notes_refs.nr)) {
1120 string_list_append_nodup(&display_notes_refs, default_notes_ref(the_repository));
1121 display_ref_env = getenv(GIT_NOTES_DISPLAY_REF_ENVIRONMENT);
1122 if (display_ref_env) {
1123 string_list_add_refs_from_colon_sep(&display_notes_refs,
1124 display_ref_env);
1125 load_config_refs = 0;
1126 } else
1127 load_config_refs = 1;
1128 }
1129
1130 repo_config(the_repository, notes_display_config, &load_config_refs);
1131
1132 if (opt) {
1133 struct string_list_item *item;
1134 for_each_string_list_item(item, &opt->extra_notes_refs)
1135 string_list_add_refs_by_glob(&display_notes_refs,
1136 item->string);
1137 }
1138
1139 display_notes_trees = load_notes_trees(&display_notes_refs, 0);
1140 string_list_clear(&display_notes_refs, 0);
1141}
1142
1143int add_note(struct notes_tree *t, const struct object_id *object_oid,
1144 const struct object_id *note_oid, combine_notes_fn combine_notes)

Callers 4

cmd_log_init_finishFunction · 0.85
cmd_format_patchFunction · 0.85
cmd_format_revFunction · 0.85
cmd_diff_treeFunction · 0.85

Calls 7

string_list_append_nodupFunction · 0.85
default_notes_refFunction · 0.85
load_notes_treesFunction · 0.85
string_list_clearFunction · 0.85
repo_configFunction · 0.70

Tested by

no test coverage detected