From f39c55480cba35d86f03be9cab4adf3163461eb6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Thu, 16 Jul 2026 11:48:18 -1000 Subject: Emit `updated` on an empty atom feed The feed-level element was written only inside the commit loop, so a feed with no commits omitted an element the atom format requires. --- source/ui-atom.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/ui-atom.c') diff --git a/source/ui-atom.c b/source/ui-atom.c index 0659e96..3dc27c6 100644 --- a/source/ui-atom.c +++ b/source/ui-atom.c @@ -154,6 +154,13 @@ void cgit_print_atom(char *tip, const char *path, int max_count) release_commit_memory(the_repository->parsed_objects, commit); commit->parents = NULL; } + if (first) { + /* An empty feed still needs one feed-level . */ + html(""); + html_txt(show_date(time(NULL), 0, + date_mode_from_type(DATE_ISO8601_STRICT))); + html("\n"); + } html("\n"); free(host); } -- cgit v2.8.0