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

Function find_commit_subject

commit.c:675–691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

673}
674
675int find_commit_subject(const char *commit_buffer, const char **subject)
676{
677 const char *eol;
678 const char *p = commit_buffer;
679
680 while (*p && (*p != '\n' || p[1] != '\n'))
681 p++;
682 if (*p) {
683 p = skip_blank_lines(p + 2);
684 eol = strchrnul(p, '\n');
685 } else
686 eol = p;
687
688 *subject = p;
689
690 return eol - p;
691}
692
693size_t commit_subject_length(const char *body)
694{

Callers 15

get_messageFunction · 0.85
try_to_commitFunction · 0.85
update_squash_messagesFunction · 0.85
do_pick_commitFunction · 0.85
walk_revs_populate_todoFunction · 0.85
make_patchFunction · 0.85
do_mergeFunction · 0.85
commit_staged_changesFunction · 0.85
show_listFunction · 0.85
generate_revert_messageFunction · 0.85
create_commitFunction · 0.85

Calls 1

skip_blank_linesFunction · 0.85

Tested by

no test coverage detected