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

Function prune_notes

notes.c:1228–1250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1226}
1227
1228void prune_notes(struct notes_tree *t, int flags)
1229{
1230 struct note_delete_list *l = NULL;
1231
1232 if (!t)
1233 t = &default_notes_tree;
1234 assert(t->initialized);
1235
1236 for_each_note(t, 0, prune_notes_helper, &l);
1237
1238 while (l) {
1239 struct note_delete_list *next;
1240
1241 if (flags & NOTES_PRUNE_VERBOSE)
1242 printf("%s\n", hash_to_hex(l->sha1));
1243 if (!(flags & NOTES_PRUNE_DRYRUN))
1244 remove_note(t, l->sha1);
1245
1246 next = l->next;
1247 free(l);
1248 l = next;
1249 }
1250}
1251
1252void free_notes(struct notes_tree *t)
1253{

Callers 1

pruneFunction · 0.85

Calls 3

for_each_noteFunction · 0.85
hash_to_hexFunction · 0.85
remove_noteFunction · 0.85

Tested by

no test coverage detected