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

Function remove_note

notes.c:1160–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1158}
1159
1160int remove_note(struct notes_tree *t, const unsigned char *object_sha1)
1161{
1162 struct leaf_node l;
1163
1164 if (!t)
1165 t = &default_notes_tree;
1166 assert(t->initialized);
1167 oidread(&l.key_oid, object_sha1, the_repository->hash_algo);
1168 oidclr(&l.val_oid, the_repository->hash_algo);
1169 note_tree_remove(t, t->root, 0, &l);
1170 if (is_null_oid(&l.val_oid)) /* no note was removed */
1171 return 1;
1172 t->dirty = 1;
1173 return 0;
1174}
1175
1176const struct object_id *get_note(struct notes_tree *t,
1177 const struct object_id *oid)

Callers 5

prune_notesFunction · 0.85
merge_one_change_manualFunction · 0.85
addFunction · 0.85
append_editFunction · 0.85
remove_one_noteFunction · 0.85

Calls 4

oidreadFunction · 0.85
oidclrFunction · 0.85
note_tree_removeFunction · 0.85
is_null_oidFunction · 0.85

Tested by

no test coverage detected