]> 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>
Sun, 28 Dec 2025 05:02:06 +0000 (14:02 +0900)
commit26238496a70f084912924d2c3af828c24bceb4aa
tree0412a6830b1c4791dc1a61e03eb200acbc349a30
parent23a720e96b98cb492077a2d23107df31dbc17a96
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