| 974 | } |
| 975 | |
| 976 | const char *format_subject(struct strbuf *sb, const char *msg, |
| 977 | const char *line_separator) |
| 978 | { |
| 979 | int first = 1; |
| 980 | |
| 981 | for (;;) { |
| 982 | const char *line = msg; |
| 983 | int linelen = get_one_line(line); |
| 984 | |
| 985 | msg += linelen; |
| 986 | if (!linelen || is_blank_line(line, &linelen)) |
| 987 | break; |
| 988 | |
| 989 | if (!sb) |
| 990 | continue; |
| 991 | strbuf_grow(sb, linelen + 2); |
| 992 | if (!first) |
| 993 | strbuf_addstr(sb, line_separator); |
| 994 | strbuf_add(sb, line, linelen); |
| 995 | first = 0; |
| 996 | } |
| 997 | return msg; |
| 998 | } |
| 999 | |
| 1000 | static void parse_commit_message(struct format_commit_context *c) |
| 1001 | { |
no test coverage detected