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

Function commit_post_rewrite

sequencer.c:1333–1346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1331}
1332
1333void commit_post_rewrite(struct repository *r,
1334 const struct commit *old_head,
1335 const struct object_id *new_head)
1336{
1337 struct notes_rewrite_cfg *cfg;
1338
1339 cfg = init_copy_notes_for_rewrite("amend");
1340 if (cfg) {
1341 /* we are amending, so old_head is not NULL */
1342 copy_note_for_rewrite(cfg, &old_head->object.oid, new_head);
1343 finish_copy_notes_for_rewrite(r, cfg, "Notes added by 'git commit --amend'");
1344 }
1345 run_rewrite_hook(&old_head->object.oid, new_head);
1346}
1347
1348static int run_prepare_commit_msg_hook(struct repository *r,
1349 struct strbuf *msg,

Callers 2

try_to_commitFunction · 0.85
cmd_commitFunction · 0.85

Calls 4

copy_note_for_rewriteFunction · 0.85
run_rewrite_hookFunction · 0.85

Tested by

no test coverage detected