src/commit-data.h

changeset 76
110a234a3260
parent 75
857af79337d5
--- a/src/commit-data.h	Fri Feb 06 18:44:47 2026 +0100
+++ b/src/commit-data.h	Wed Feb 25 21:13:55 2026 +0100
@@ -31,14 +31,24 @@
 #include <string>
 
 namespace fm {
+    struct commit_info final {
+        std::string hash;
+        std::string message;
+        commit_info(std::string_view hash, std::string_view message)
+            : hash{hash}, message {message} {}
+    };
+
     using commit_counts = std::unordered_map<
         std::string, // repository name
         unsigned>;
     using summaries_lists = std::unordered_map<
         std::string, // repository name
-        std::vector<std::string> >;
+        std::vector<commit_info> >;
     using tag_lists = std::unordered_map<
         std::string, // repository name
+        std::vector<commit_info> >;
+    using tag_summaries = std::unordered_map<
+        std::string, // repository name
         std::vector<std::string> >;
 
     struct commits final {
@@ -57,7 +67,7 @@
     };
 
     struct commit_summary final {
-        tag_lists tags_with_date;
+        tag_summaries tags_with_date;
         commit_counts commits;
 
         [[nodiscard]] unsigned count(const std::string &repo) const {

mercurial