From: Jacob Abel Date: Wed, 19 Apr 2023 16:50:36 GMT Subject: Re: [PATCH v9 2/8] t2400: print captured git output when finished Message-ID: In-Reply-To: On 23/04/19 08:41AM, Junio C Hamano wrote: > Jacob Abel 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).