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

Function run_apply_check

add-patch.c:1345–1360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1343}
1344
1345static int run_apply_check(struct add_p_state *s,
1346 struct file_diff *file_diff)
1347{
1348 struct child_process cp = CHILD_PROCESS_INIT;
1349
1350 strbuf_reset(&s->buf);
1351 reassemble_patch(s, file_diff, 1, &s->buf);
1352
1353 setup_child_process(s, &cp,
1354 "apply", "--check", NULL);
1355 strvec_pushv(&cp.args, s->mode->apply_check_args);
1356 if (pipe_command(&cp, s->buf.buf, s->buf.len, NULL, 0, NULL, 0))
1357 return error(_("'git apply --cached' failed"));
1358
1359 return 0;
1360}
1361
1362static int read_single_character(struct add_p_state *s)
1363{

Callers 1

edit_hunk_loopFunction · 0.85

Calls 5

reassemble_patchFunction · 0.85
setup_child_processFunction · 0.85
strvec_pushvFunction · 0.85
pipe_commandFunction · 0.85
errorFunction · 0.85

Tested by

no test coverage detected