From 90a98e029688730fcaa9e6199b06bbce85a13df3 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:41:04 -0700 Subject: Print the commit and tag dates through one helper --- source/ui-commit.c | 8 +++----- source/ui-shared.c | 9 +++++++++ source/ui-shared.h | 6 ++++++ source/ui-tag.c | 8 +++----- 4 files changed, 21 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/ui-commit.c b/source/ui-commit.c index 8e88faf..0916c33 100644 --- a/source/ui-commit.c +++ b/source/ui-commit.c @@ -31,11 +31,9 @@ static void print_ident_row(const char *role, const char *name, const char *emai { htmlf("%s", role); cgit_print_person(name, email, "commit", 1); - html("\n"); + html(""); + cgit_print_date(date, tz); + html("\n"); } /* diff --git a/source/ui-shared.c b/source/ui-shared.c index 8c5e4e5..5e2a9de 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1308,6 +1308,15 @@ void cgit_print_age(time_t t, int tz, time_t max_relative) print_rel_date(t, tz, secs * 1.0 / SECONDS_PER_YEAR, "age-years", "years"); } +void cgit_print_date(timestamp_t date, int tz) +{ + html(""); +} + void cgit_print_person(const char *name, const char *email, const char *origin, int show_email) { cgit_open_filter(ctx.repo->email_filter, email ? email : "", origin); diff --git a/source/ui-shared.h b/source/ui-shared.h index 6b58ab3..ee350f0 100644 --- a/source/ui-shared.h +++ b/source/ui-shared.h @@ -108,6 +108,12 @@ extern struct date_mode cgit_date_mode(enum date_mode_type type); */ extern void cgit_print_age(time_t t, int tz, time_t max_relative); +/* + * Print date as a