git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] t9800: correct misuse of 'show -s --raw' in a test

From
Junio C Hamano <gitster@pobox.com>
Date
May 8, 2023, 20:53 UTC
Message-ID
<xmqqild2mtod.fsf@gitster.g>
In-Reply-To
<20230508185545.GA1893355@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 8 quoted lines
>> * 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.
Thanks.

This still can be a cause for backward compatibility worry, though. I do not think anybody would have lifted $(git show -s --raw --format=%ad) as a way to get the author timestamp from this test script, but it is entirely possible that this was written by the author who saw it done (incorrectly) that way elsewhere, and who knows how many others copied that (incorrect) way of using "-s --raw" from that original source we have no control over.

Anyway.
Previous: Jeff King
Message 3 of 3 in “t9800: correct misuse of 'show -s --raw' in a test”
  1. t9800: correct misuse of 'show -s --raw' in a testJunio C Hamano, May 6, 2023
  2. Jeff KingMay 8, 2023
  3. Junio C HamanoMay 8, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.