| 1210 | } |
| 1211 | |
| 1212 | void cleanup_message(struct strbuf *msgbuf, |
| 1213 | enum commit_msg_cleanup_mode cleanup_mode, int verbose) |
| 1214 | { |
| 1215 | if (verbose || /* Truncate the message just before the diff, if any. */ |
| 1216 | cleanup_mode == COMMIT_MSG_CLEANUP_SCISSORS) |
| 1217 | strbuf_setlen(msgbuf, wt_status_locate_end(msgbuf->buf, msgbuf->len)); |
| 1218 | if (cleanup_mode != COMMIT_MSG_CLEANUP_NONE) |
| 1219 | strbuf_stripspace(msgbuf, |
| 1220 | cleanup_mode == COMMIT_MSG_CLEANUP_ALL ? comment_line_str : NULL); |
| 1221 | } |
| 1222 | |
| 1223 | /* |
| 1224 | * Find out if the message in the strbuf contains only whitespace and |
no test coverage detected