]> Kevux Git Server - rit/commit
hook: provide stdin via callback
authorEmily Shaffer <emilyshaffer@google.com>
Wed, 28 Jan 2026 21:39:19 +0000 (23:39 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 28 Jan 2026 23:47:03 +0000 (15:47 -0800)
commit33e5914863ab232164571c2e259cfa1e9c3f30dd
tree435438ce249b7e483ead6b793bc3c442f8759200
parentec0becacc9847406f2b0147a81f62e023b006351
hook: provide stdin via callback

This adds a callback mechanism for feeding stdin to hooks alongside
the existing path_to_stdin (which slurps a file's content to stdin).

The advantage of this new callback is that it can feed stdin without
going through the FS layer. This helps when feeding large amount of
data and uses the run-command parallel stdin callback introduced in
the preceding commit.

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>
hook.c
hook.h