Re: [PATCH v8 1/6] run-command: add duplicate_output_fn to run_processes_parallel_opts
- From
Calvin Wan <calvinwan@google.com>
- Date
- Feb 13, 2023, 18:26 UTC
- Message-ID
- <CAFySSZDMO6=YL6wVxyfj6h8piTFg7OygMdqdELspnQWpm4yJ7A@mail.gmail.com>
- In-Reply-To
- <xmqqbklxcv1v.fsf@gitster.g>
Show 9 quoted lines
> > Sidenote: One convention from JS that I like is to name such event > > listeners as "on_<event_name>", e.g. "on_output_buffered". > > Thanks for bringing this up. I agree that "Upon X happening, do > this" is a very good convention to follow. I think the callback is > made whenever the child emits to the standard error stream, so > "on_error_output" (if we are worried that "error" has a too strong > "something bad happend" connotation, then perhaps "on_stderr_output" > may dampen it) perhaps?
"on_stderr_output" sounds much better than "duplicate_output". I did spend much time trying to come up with a better name, but couldn't find anything that conveyed what the expected use case of this function was. Thanks, I'll rename it on my next reroll.