| 1158 | } |
| 1159 | |
| 1160 | int 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 | |
| 1176 | const struct object_id *get_note(struct notes_tree *t, |
| 1177 | const struct object_id *oid) |
no test coverage detected