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

Re: [PATCH v2] pretty: Provide a strict ISO8601 date format

From
Beat Bolli <bbolli@ewanet.ch>
Date
Aug 29, 2014, 21:02 UTC
Message-ID
<5400EA6C.3030504@ewanet.ch>
In-Reply-To
<xmqqwq9r5dhb.fsf@gitster.dls.corp.google.com>
On 29.08.14 20:59, Junio C Hamano wrote:
Show 12 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=%aI%n%cI >actual &&
>> +	test_cmp expected actual
>> +'
> 
> This is saying that as long as --date=iso-strict format is
> bug-to-bug compatible with --date=iso format it is OK.
> 
> Which is fine, especially knowing the implementation ;-)
> 

Yeah, I wasn't sure how to test this, since the commit dates change with each test run. Maybe it's the easy way out, but on the other hand it's better than no test at all. Check the known parts with a regex?

Thanks, Beat

-- 
mail: echo '<bNbolOli@ewaSPnetAM.ch>' | tr -d '[A-S]'
pgp: 0x506A903A; 49D5 794A EA77 F907 764F  D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E

"It takes love over gold, and mind over matter" -- Dire Straits
Previous: Beat BolliNext: Jeff King
Message 6 of 7 in “pretty: Provide a strict ISO8601 date format”
  1. pretty: Provide a strict ISO8601 date formatBeat Bolli, Aug 29, 2014
  2. Junio C HamanoAug 29, 2014
  3. Junio C HamanoAug 29, 2014
  4. Andreas SchwabAug 29, 2014
  5. Beat BolliAug 29, 2014
  6. Beat BolliAug 29, 2014
  7. Jeff KingAug 29, 2014

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.