]> 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>
Thu, 15 Jan 2026 21:10:30 +0000 (13:10 -0800)
commit60a803639d37ecfae4906522b4692b68c821dc14
treec48fcfa09426e137ccaa1fd557ad7502a3893874
parent4750485897b6681e0b6ca2caaadadaf660b4bb9c
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