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

Function write_each_non_note_until

notes.c:741–761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

739};
740
741static int write_each_non_note_until(const char *note_path,
742 struct write_each_note_data *d)
743{
744 struct non_note *p = d->nn_prev;
745 struct non_note *n = p ? p->next : *d->nn_list;
746 int cmp = 0, ret;
747 while (n && (!note_path || (cmp = strcmp(n->path, note_path)) <= 0)) {
748 if (note_path && cmp == 0)
749 ; /* do nothing, prefer note to non-note */
750 else {
751 ret = write_each_note_helper(d->root, n->path, n->mode,
752 &n->oid);
753 if (ret)
754 return ret;
755 }
756 p = n;
757 n = n->next;
758 }
759 d->nn_prev = p;
760 return 0;
761}
762
763static int write_each_note(const struct object_id *object_oid UNUSED,
764 const struct object_id *note_oid, char *note_path,

Callers 2

write_each_noteFunction · 0.85
write_notes_treeFunction · 0.85

Calls 1

write_each_note_helperFunction · 0.85

Tested by

no test coverage detected