From e9d4f22210c2fbaa3dd1be35f5cd2929cd5bd165 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Fri, 9 Oct 2026 19:33:01 +0200 Subject: [PATCH] ResultReport: RUGNUX_GIT has no trailing space when the build knows no commit date Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- rugnux/ResultReport.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rugnux/ResultReport.cpp b/rugnux/ResultReport.cpp index 805150c30..8c3902113 100644 --- a/rugnux/ResultReport.cpp +++ b/rugnux/ResultReport.cpp @@ -442,8 +442,10 @@ ReportDocument BuildReportDocument(const std::string &output_prefix, // "-dirty" suffix marks uncommitted changes - and the compiler flags it was built with. // Both are provenance the version string does not carry: two builds of one commit can // differ by flags alone, and -march moves the CPU-bound results. - if (!jfjoch_git_sha1().empty()) - Add(h, KeyText("RUGNUX_GIT", jfjoch_git_sha1() + " " + jfjoch_git_date())); + if (!jfjoch_git_sha1().empty()) { + const std::string git_date = jfjoch_git_date(); + Add(h, KeyText("RUGNUX_GIT", git_date.empty() ? jfjoch_git_sha1() : jfjoch_git_sha1() + " " + git_date)); + } Add(h, KeyText("BUILD_CXX_FLAGS", jfjoch_build_cxx_flags().empty() ? "NONE" : jfjoch_build_cxx_flags())); Add(h, KeyText("DATE", time_UTC(std::chrono::system_clock::now())));