Re: [PATCH 5/5] MyFirstObjectWalk: add stderr to pipe processing
- From
Dirk Gouders <dirk@gouders.net>
- Date
- Mar 12, 2024, 14:27 UTC
- Message-ID
- <ghbk7ja5k2.fsf@gouders.net>
- In-Reply-To
- <xmqqh6hcmhmu.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Dirk Gouders <dirk@gouders.net> writes: > >> In the last chapter of this document, pipes are used in commands to >> filter out the first/last trace messages. But according to git(1), >> trace messages are sent to stderr if GIT_TRACE is set to '1', so those >> commands do not produce the described results. >> >> Fix this by using the operator '|&' to additionally connect stderr to >> stdin of the latter command. > > Isn't |& a bash-ism? > > upstream command >&2 | downstream command > > is how you would do the same more portably.
Ah yes, it is a bash-ism, thank you.
I guess you meant
upstream command 2>&1 | downstream command
I will wait a bit (some days) for other comments and then at least remove this bash-ism plus the wrong tags you also mentioned -- also thanks for that.
Dirk