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

Function run_rewrite_hook

sequencer.c:1313–1331  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1311}
1312
1313static int run_rewrite_hook(const struct object_id *oldoid,
1314 const struct object_id *newoid)
1315{
1316 struct run_hooks_opt opt = RUN_HOOKS_OPT_INIT;
1317 int code;
1318 struct strbuf sb = STRBUF_INIT;
1319
1320 strbuf_addf(&sb, "%s %s\n", oid_to_hex(oldoid), oid_to_hex(newoid));
1321
1322 opt.feed_pipe_ctx = &sb;
1323 opt.feed_pipe = pipe_from_strbuf;
1324
1325 strvec_push(&opt.args, "amend");
1326
1327 code = run_hooks_opt(the_repository, "post-rewrite", &opt);
1328
1329 strbuf_release(&sb);
1330 return code;
1331}
1332
1333void commit_post_rewrite(struct repository *r,
1334 const struct commit *old_head,

Callers 1

commit_post_rewriteFunction · 0.85

Calls 5

strbuf_addfFunction · 0.85
oid_to_hexFunction · 0.85
strvec_pushFunction · 0.85
strbuf_releaseFunction · 0.85
run_hooks_optClass · 0.70

Tested by

no test coverage detected