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

Function cleanup_message

sequencer.c:1212–1221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1210}
1211
1212void 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

Callers 3

prepare_to_commitFunction · 0.85
cmd_commitFunction · 0.85
fill_commit_messageFunction · 0.85

Calls 3

strbuf_setlenFunction · 0.85
wt_status_locate_endFunction · 0.85
strbuf_stripspaceFunction · 0.85

Tested by

no test coverage detected