Re: [PATCH] t9800: correct misuse of 'show -s --raw' in a test
- From
Jeff King <peff@peff.net>
- Date
- May 8, 2023, 18:55 UTC
- Message-ID
- <20230508185545.GA1893355@coredump.intra.peff.net>
- In-Reply-To
- <xmqqild5rvvw.fsf@gitster.g>
On Sat, May 06, 2023 at 02:29:55PM -0700, Junio C Hamano wrote:
Show 18 quoted lines
> There is $(git show -s --raw --pretty=format:%at HEAD) in this test > that is meant to grab the author time of the commit. We used to > have a bug in the command line option parser of the diff family of > commands, where "show -s --raw" was identical to "show -s". > > With the "-s" bug fixed, "show -s --raw" would mean the same thing > as "show --raw", i.e. show the output from the diff machinery in the > "raw" format. And this test will start failing, so fix it before > that happens. > > Signed-off-by: Junio C Hamano <gitster@pobox.com> > --- > > * It appears pretty obvious that the original wanted to just grab > the %at timestamp of the HEAD, and with the fix to allow output > format options to take effect after "-s" is given, the existing > misuse of "--raw" after "-s" that ought to be a no-op breaks the > test.
Yes, I think this is matching what the original code was trying to do. The patch looks good to me.
-Peff