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

Function generate_revert_message

replay.c:59–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59static void generate_revert_message(struct strbuf *msg,
60 struct commit *commit,
61 struct repository *repo)
62{
63 const char *out_enc = get_commit_output_encoding();
64 const char *message = repo_logmsg_reencode(repo, commit, NULL, out_enc);
65 const char *subject_start;
66 int subject_len;
67 char *subject;
68
69 subject_len = find_commit_subject(message, &subject_start);
70 subject = xmemdupz(subject_start, subject_len);
71
72 sequencer_format_revert_message(repo, subject, commit,
73 commit->parents ? commit->parents->item : NULL,
74 false, msg);
75
76 free(subject);
77 repo_unuse_commit_buffer(repo, commit, message);
78}
79
80static struct commit *create_commit(struct repository *repo,
81 struct tree *tree,

Callers 1

create_commitFunction · 0.85

Calls 6

repo_logmsg_reencodeFunction · 0.85
find_commit_subjectFunction · 0.85
xmemdupzFunction · 0.85
repo_unuse_commit_bufferFunction · 0.85

Tested by

no test coverage detected