From: Jeff King <peff@peff.net>
To: Beat Bolli <bbolli@ewanet.ch>
Cc: Junio C Hamano <gitster@pobox.com>, git@vger.kernel.org
Subject: Re: [PATCH v2] pretty: Provide a strict ISO8601 date format
Date: Fri, 29 Aug 2014 18:12:07 -0400 [thread overview]
Message-ID: <20140829221206.GB24834@peff.net> (raw)
In-Reply-To: <5400EA6C.3030504@ewanet.ch>
On Fri, Aug 29, 2014 at 11:02:36PM +0200, Beat Bolli wrote:
> On 29.08.14 20:59, Junio C Hamano wrote:
> >> +# 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?
If you use test_tick (or test_commit, which calls it), the timestamps
are stable from run to run of the tests.
-Peff
prev parent reply other threads:[~2014-08-29 22:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-29 16:58 [PATCH v2] pretty: Provide a strict ISO8601 date format Beat Bolli
2014-08-29 18:59 ` Junio C Hamano
2014-08-29 19:04 ` Junio C Hamano
2014-08-29 19:34 ` Andreas Schwab
2014-08-29 21:30 ` Beat Bolli
2014-08-29 21:02 ` Beat Bolli
2014-08-29 22:12 ` Jeff King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140829221206.GB24834@peff.net \
--to=peff@peff.net \
--cc=bbolli@ewanet.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).