Subject: Re: [PATCH] hook: make stdout_to_stderr optional

From: Junio C Hamano <[email-masked]>
Date: Tue, 13 Jan 2026 06:06:06 -0800

Junio C Hamano <[email-masked]> writes:

> What was the previous behaviour of code paths that ran other hooks?
> Was pre-push the only one that didn't divert standard output to
> standard error?  This patch does look like a proper regression fix
> in that case.  I browsed "git log -p 1627809eef..c65f26fca4" (i.e.,
> the change for "Merge branch 'ar/run-command-hook'") and random
> sampling (like run_receive_hook() that used run_and_feed_hook(),
> which set stdout_to_stderr to 1) seems to indicate that it is the
> case.

By the way, if stdout_to_stderr is by default set to true, but tnis
regression fix allows specific callers to opt out of it, then the
title "make stdout_to_stderr optional" is a bit misleaing.  It makes
it sound as if it is false by default and optionally turned on.

Perhaps like "hook: allow stdout_to_stderr optionally off" or
something?

Thanks.