* Wrapper around strbuf_add_commented_lines() which avoids double * commenting commit subjects. */
| 1903 | * commenting commit subjects. |
| 1904 | */ |
| 1905 | static 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? */ |
| 1923 | static int seen_squash(struct replay_ctx *ctx) |
nothing calls this directly
no test coverage detected