Re: [PATCH v9 2/8] t2400: print captured git output when finished
- From
Jacob Abel <jacobabel@nullpo.dev>
- Date
- Apr 19, 2023, 16:50 UTC
- Message-ID
- <hhuzqzxm7zjijrocghio3mwh7hyacsgz6d5adpxg2gy6on5vf2@u3h2hcuvfl5z>
- In-Reply-To
- <xmqqmt33angr.fsf@gitster.g>
On 23/04/19 08:41AM, Junio C Hamano wrote:
Show 20 quoted lines
> Jacob Abel <jacobabel@nullpo.dev> writes: > > > [...] > > While I do not understand what you are trying to achieve here, if > you expect both the standard output and error streams are quiet, > then > > cmd >output 2>&1 > > would store both to 'output' and test_must_be_empty can check what > is in there. > > On the other hand, > > cmd 2>&1 >output > > would store the standard output of 'cmd' in 'output' while sending > the standard error of 'cmd' to the standard output of the whole > thing.
I thought it was redirecting to both actual and stdout (like a tee would) and jumped the gun (replying to your message) before verifying that it worked as I assumed.
The goal was to be able to capture stderr without suppressing it in the output of `sh t2400-*.sh -x`. The original solution I had did it's job while I was debugging an issue for the later patches in this set and I suppose I could have always used `-i` and looked inside `actual` myself after the git command failed.
Since the issues with the patchset I was having were resolved and there is an alternate way to debug the tests in the event they fail, I'm just going to drop these changes (and drop the `cat actual` changes).