]> git.ipfire.org Git - thirdparty/git.git/commit
receive-pack: convert receive hooks to hook API
authorEmily Shaffer <emilyshaffer@google.com>
Fri, 26 Dec 2025 12:23:34 +0000 (14:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 28 Dec 2025 05:02:07 +0000 (14:02 +0900)
commitc65f26fca46f742e8e457d859a83c4e6ef3c3953
treefa42a04f47b9ef6d3ad5a8a0861996d8b75d9f85
parent0bbaf3653f54f49ac124c623906983839c38b354
receive-pack: convert receive hooks to hook API

This converts the last remaining hooks to the new hook API, for
the same benefits as the previous conversions (no need to toggle
signals, manage custom struct child_process, call find_hook(),
prepares for specifyinig hooks via configs, etc.).

I noticed a performance degradation when processing large amounts
of hook input with just 1 line per callback, due to run-command's
poll loop, therefore I batched 500 lines per callback, to ensure
similar pipe throughput as before and to avoid hook child waiting
on stdin.

Signed-off-by: Emily Shaffer <emilyshaffer@google.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/receive-pack.c