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())));