]> git.ipfire.org Git - thirdparty/git.git/commit
run-command.c: don't copy *_fn to "struct parallel_processes"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 12 Oct 2022 21:02:29 +0000 (23:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Oct 2022 21:12:41 +0000 (14:12 -0700)
commitfa93951d796a4837f6d24c54b638b976dbb17a8b
treed87c8a5e04b707acdbc2b7f8b8a83a90fbf9c6bd
parente39c9de8607cacee4cc5169c2e014bc59acbbcde
run-command.c: don't copy *_fn to "struct parallel_processes"

The only remaining reason for copying the callbacks in the "struct
run_process_parallel_opts" over to the "struct parallel_processes" was
to avoid two if/else statements in case the "start_failure" and
"task_finished" callbacks were NULL.

Let's handle those cases in pp_start_one() and pp_collect_finished()
instead, and avoid the default_* stub functions, and the need to copy
this data around.

Organizing the code like this made more sense before the "struct
run_parallel_parallel_opts" existed, as we'd have needed to pass each
of these as a separate parameter.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c