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

Function add_commented_lines

sequencer.c:1905–1920  ·  view source on GitHub ↗

* Wrapper around strbuf_add_commented_lines() which avoids double * commenting commit subjects. */

Source from the content-addressed store, hash-verified

1903 * commenting commit subjects.
1904 */
1905static void add_commented_lines(struct strbuf *buf, const void *str, size_t len)
1906{
1907 const char *s = str;
1908 while (starts_with_mem(s, len, comment_line_str)) {
1909 size_t count;
1910 const char *n = memchr(s, '\n', len);
1911 if (!n)
1912 count = len;
1913 else
1914 count = n - s + 1;
1915 strbuf_add(buf, s, count);
1916 s += count;
1917 len -= count;
1918 }
1919 strbuf_add_commented_lines(buf, s, len, comment_line_str);
1920}
1921
1922/* Does the current fixup chain contain a squash command? */
1923static int seen_squash(struct replay_ctx *ctx)

Callers

nothing calls this directly

Calls 3

starts_with_memFunction · 0.85
strbuf_addFunction · 0.85

Tested by

no test coverage detected