summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2022-02-16 09:14:03 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2022-02-16 09:40:00 -0800
commitf1842898324330dcf7a3b30ea08d18a68bd19ceb (patch)
treede9ec60456d9f3f2b3e36db374d27288bed97eff /t
parentdate API: create a date.h, split from cache.h (diff)
downloadtgif-f1842898324330dcf7a3b30ea08d18a68bd19ceb.tar.xz
date API: provide and use a DATE_MODE_INIT
Provide and use a DATE_MODE_INIT macro. Most of the users of struct date_mode" use it via pretty.h's "struct pretty_print_context" which doesn't have an initialization macro, so we're still bound to being initialized to "{ 0 }" by default. But we can change the couple of callers that directly declared a variable on the stack to instead use the initializer, and thus do away with the "mode.local = 0" added in add00ba2de9 (date: make "local" orthogonal to date format, 2015-09-03). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/helper/test-date.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/helper/test-date.c b/t/helper/test-date.c
index ded3d059f5..111071e1dd 100644
--- a/t/helper/test-date.c
+++ b/t/helper/test-date.c
@@ -35,7 +35,7 @@ static void show_human_dates(const char **argv)
static void show_dates(const char **argv, const char *format)
{
- struct date_mode mode;
+ struct date_mode mode = DATE_MODE_INIT;
parse_date_format(format, &mode);
for (; *argv; argv++) {