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

Re: [PATCH 1/2] pretty tests: simplify %aI/%cI date format test

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 27, 2021, 07:08 UTC
Message-ID
<xmqqtunsdx1f.fsf@gitster.g>
In-Reply-To
<patch-1.2-4a90e4a141a-20210425T090506Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 6 quoted lines
>  # ISO strict date format
>  test_expect_success 'ISO and ISO-strict date formats display the same values' '
> -	git log --format=%ai%n%ci |
> -	sed -e "s/ /T/; s/ //; s/..\$/:&/" >expected &&
> +	git log --format=%ad%n%cd --date=iso-strict >expected &&
>  	git log --format=%aI%n%cI >actual &&

While these two must show the same output, I wonder how much value we are getting out of them. Don't they end up exercising pretty much the same codepath?

Not that I think the original is any better at all, though ;-)
>  	test_cmp expected actual
>  '
Previous: Beat BolliNext: Ævar Arnfjörð Bjarmason
Message 11 of 15 in “[GSOC] pretty: provide human date format”
  1. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 23, 2021
  2. Taylor BlauApr 23, 2021
  3. ZheNing HuApr 24, 2021
  4. Philip OakleyApr 23, 2021
  5. ZheNing HuApr 24, 2021
  6. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 24, 2021
  7. Philip OakleyApr 24, 2021
  8. 0/2 pretty tests: --date/format test improvementsÆvar Arnfjörð Bjarmason, Apr 25, 2021
  9. 1/2 pretty tests: simplify %aI/%cI date format testÆvar Arnfjörð Bjarmason, Apr 25, 2021
  10. Beat BolliApr 26, 2021
  11. Junio C HamanoApr 27, 2021
  12. 2/2 pretty tests: give --date/format tests a better descriptionÆvar Arnfjörð Bjarmason, Apr 25, 2021
  13. ZheNing HuApr 25, 2021
  14. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, Apr 25, 2021
  15. [GSOC] pretty: provide human date formatZheNing Hu via GitGitGadget, May 3, 2021

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.