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

Function add_note

notes.c:1143–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
1145{
1146 struct leaf_node *l;
1147
1148 if (!t)
1149 t = &default_notes_tree;
1150 assert(t->initialized);
1151 t->dirty = 1;
1152 if (!combine_notes)
1153 combine_notes = t->combine_notes;
1154 l = (struct leaf_node *) xmalloc(sizeof(struct leaf_node));
1155 oidcpy(&l->key_oid, object_oid);
1156 oidcpy(&l->val_oid, note_oid);
1157 return note_tree_insert(t, t->root, 0, l, PTR_TYPE_NOTE, combine_notes);
1158}
1159
1160int remove_note(struct notes_tree *t, const unsigned char *object_sha1)
1161{

Callers 8

copy_noteFunction · 0.85
notes_cache_putFunction · 0.85
merge_one_changeFunction · 0.85
merge_changesFunction · 0.85
notes_merge_commitFunction · 0.85
addFunction · 0.85
copyFunction · 0.85
append_editFunction · 0.85

Calls 3

oidcpyFunction · 0.85
note_tree_insertFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected