]> git.ipfire.org Git - thirdparty/git.git/commit
hook: provide stdin via callback
authorEmily Shaffer <emilyshaffer@google.com>
Fri, 26 Dec 2025 12:23:26 +0000 (14:23 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jan 2026 21:10:29 +0000 (13:10 -0800)
commitcc1f505ff961925282cf3e902d5552afcea04dfb
tree46e928bbe94ab023974a0e468e63943670407d13
parent6e2e7f6c1e4722e451168e1ca4f04d139ff758b0
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