MCPcopy Create free account
hub / github.com/git/git / graph_show_strbuf

Function graph_show_strbuf

graph.c:1622–1647  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1620}
1621
1622static void graph_show_strbuf(struct git_graph *graph,
1623 FILE *file,
1624 struct strbuf const *sb)
1625{
1626 char *p;
1627
1628 /*
1629 * Print the strbuf line by line,
1630 * and display the graph info before each line but the first.
1631 */
1632 p = sb->buf;
1633 while (p) {
1634 size_t len;
1635 char *next_p = strchr(p, '\n');
1636 if (next_p) {
1637 next_p++;
1638 len = next_p - p;
1639 } else {
1640 len = (sb->buf + sb->len) - p;
1641 }
1642 fwrite(p, sizeof(char), len, file);
1643 if (next_p && *next_p != '\0')
1644 graph_show_oneline(graph);
1645 p = next_p;
1646 }
1647}
1648
1649void graph_show_commit_msg(struct git_graph *graph,
1650 FILE *file,

Callers 1

graph_show_commit_msgFunction · 0.85

Calls 1

graph_show_onelineFunction · 0.85

Tested by

no test coverage detected