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

Function add_line_count

diff.c:1819–1832  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1817}
1818
1819static void add_line_count(struct strbuf *out, int count)
1820{
1821 switch (count) {
1822 case 0:
1823 strbuf_addstr(out, "0,0");
1824 break;
1825 case 1:
1826 strbuf_addstr(out, "1");
1827 break;
1828 default:
1829 strbuf_addf(out, "1,%d", count);
1830 break;
1831 }
1832}
1833
1834static void emit_rewrite_lines(struct emit_callback *ecbdata,
1835 int prefix, const char *data, int size)

Callers 1

emit_rewrite_diffFunction · 0.85

Calls 2

strbuf_addstrFunction · 0.85
strbuf_addfFunction · 0.85

Tested by

no test coverage detected