From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>,
"ZheNing Hu" <adlternative@gmail.com>,
"René Scharfe" <l.s.r@web.de>, "Taylor Blau" <me@ttaylorr.com>,
"Beat Bolli" <bbolli@ewanet.ch>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 2/2] pretty tests: give --date/format tests a better description
Date: Sun, 25 Apr 2021 11:11:33 +0200 [thread overview]
Message-ID: <patch-2.2-6a17343b23b-20210425T090506Z-avarab@gmail.com> (raw)
In-Reply-To: <cover-0.2-00000000000-20210425T090506Z-avarab@gmail.com>
Change the description for the --date/format equivalency tests added
in 466fb6742d7 (pretty: provide a strict ISO 8601 date format,
2014-08-29) and 0df621172d8 (pretty: provide short date format,
2019-11-19) to be more meaningful.
This allows us to reword the comment added in the former commit to
refer to both tests, and any other future test, such as the in-flight
--date=human format being proposed in [1].
1. http://lore.kernel.org/git/pull.939.v2.git.1619275340051.gitgitgadget@gmail.com
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
---
t/t4205-log-pretty-formats.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index 0462115ac5c..bcb558ef4d7 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -525,14 +525,14 @@ test_expect_success 'strbuf_utf8_replace() not producing NUL' '
! grep Q actual
'
-# ISO strict date format
-test_expect_success 'ISO and ISO-strict date formats display the same values' '
+# --date=[XXX] and corresponding %a[X] %c[X] format equivalency
+test_expect_success '--date=iso-strict %ad%cd is the same as %aI%cI' '
git log --format=%ad%n%cd --date=iso-strict >expected &&
git log --format=%aI%n%cI >actual &&
test_cmp expected actual
'
-test_expect_success 'short date' '
+test_expect_success '--date=short %ad%cd is the same as %as%cs' '
git log --format=%ad%n%cd --date=short >expected &&
git log --format=%as%n%cs >actual &&
test_cmp expected actual
--
2.31.1.734.g8d26f61af32
next prev parent reply other threads:[~2021-04-25 9:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 16:27 [PATCH] [GSOC] pretty: provide human date format ZheNing Hu via GitGitGadget
2021-04-23 20:21 ` Taylor Blau
2021-04-24 13:26 ` ZheNing Hu
2021-04-23 21:10 ` Philip Oakley
2021-04-24 13:33 ` ZheNing Hu
2021-04-24 14:42 ` [PATCH v2] " ZheNing Hu via GitGitGadget
2021-04-24 19:44 ` Philip Oakley
2021-04-25 9:11 ` [PATCH 0/2] pretty tests: --date/format test improvements Ævar Arnfjörð Bjarmason
2021-04-25 9:11 ` [PATCH 1/2] pretty tests: simplify %aI/%cI date format test Ævar Arnfjörð Bjarmason
2021-04-26 21:22 ` Beat Bolli
2021-04-27 7:08 ` Junio C Hamano
2021-04-25 9:11 ` Ævar Arnfjörð Bjarmason [this message]
2021-04-25 9:30 ` [PATCH 2/2] pretty tests: give --date/format tests a better description ZheNing Hu
2021-04-25 10:41 ` [PATCH v3] [GSOC] pretty: provide human date format ZheNing Hu via GitGitGadget
2021-05-03 15:37 ` [PATCH v4] " ZheNing Hu via GitGitGadget
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=patch-2.2-6a17343b23b-20210425T090506Z-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=adlternative@gmail.com \
--cc=bbolli@ewanet.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=l.s.r@web.de \
--cc=me@ttaylorr.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).