| 761 | } |
| 762 | |
| 763 | static int write_each_note(const struct object_id *object_oid UNUSED, |
| 764 | const struct object_id *note_oid, char *note_path, |
| 765 | void *cb_data) |
| 766 | { |
| 767 | struct write_each_note_data *d = |
| 768 | (struct write_each_note_data *) cb_data; |
| 769 | size_t note_path_len = strlen(note_path); |
| 770 | unsigned int mode = 0100644; |
| 771 | |
| 772 | if (note_path[note_path_len - 1] == '/') { |
| 773 | /* subtree entry */ |
| 774 | note_path_len--; |
| 775 | note_path[note_path_len] = '\0'; |
| 776 | mode = 040000; |
| 777 | } |
| 778 | assert(note_path_len <= GIT_MAX_HEXSZ + FANOUT_PATH_SEPARATORS); |
| 779 | |
| 780 | /* Weave non-note entries into note entries */ |
| 781 | return write_each_non_note_until(note_path, d) || |
| 782 | write_each_note_helper(d->root, note_path, mode, note_oid); |
| 783 | } |
| 784 | |
| 785 | struct note_delete_list { |
| 786 | struct note_delete_list *next; |
nothing calls this directly
no test coverage detected