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
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
Previous: Junio C HamanoNext: Junio C Hamano
Message 2 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.