diff options
| author | Emily Shaffer <emilyshaffer@google.com> | 2025-10-17 17:15:41 +0300 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-17 14:32:52 -0700 |
| commit | bdf49ba9aa4090d1b3784eaa0e9e364e340202fa (patch) | |
| tree | d0c92c136b18787488671e30ef33edd95cd8e1ba /commit.c | |
| parent | reference-transaction: use hook API instead of run-command (diff) | |
| download | git-bdf49ba9aa4090d1b3784eaa0e9e364e340202fa.tar.gz git-bdf49ba9aa4090d1b3784eaa0e9e364e340202fa.zip | |
run-command: allow capturing of collated output
Some callers, for example server-side hooks which wish to relay hook
output to clients across a transport, want to capture what would
normally print to stderr and do something else with it. Allow that via a
callback.
By calling the callback regardless of whether there's output available,
we allow clients to send e.g. a keepalive if necessary.
Because we expose a strbuf, not a fd or FILE*, there's no need to create
a temporary pipe or similar - we can just skip the print to stderr and
instead hand it to the caller.
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>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions
