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

Function tree_write_stack_init_subtree

notes.c:660–674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658}
659
660static void tree_write_stack_init_subtree(struct tree_write_stack *tws,
661 const char *path)
662{
663 struct tree_write_stack *n;
664 assert(!tws->next);
665 assert(tws->path[0] == '\0' && tws->path[1] == '\0');
666 n = (struct tree_write_stack *)
667 xmalloc(sizeof(struct tree_write_stack));
668 n->next = NULL;
669 strbuf_init(&n->buf, 256 * (32 + the_hash_algo->hexsz)); /* assume 256 entries per tree */
670 n->path[0] = n->path[1] = '\0';
671 tws->next = n;
672 tws->path[0] = path[0];
673 tws->path[1] = path[1];
674}
675
676static int tree_write_stack_finish_subtree(struct tree_write_stack *tws)
677{

Callers 1

write_each_note_helperFunction · 0.85

Calls 2

strbuf_initFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected