| 1331 | } |
| 1332 | |
| 1333 | void 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 | |
| 1348 | static int run_prepare_commit_msg_hook(struct repository *r, |
| 1349 | struct strbuf *msg, |
no test coverage detected