src/main.cpp

changeset 61
d77763d2fdda
parent 59
881ab7ae15a6
--- a/src/main.cpp	Sun Aug 10 11:59:03 2025 +0200
+++ b/src/main.cpp	Sun Aug 10 15:22:25 2025 +0200
@@ -260,7 +260,7 @@
             proc.setbin(settings.hg);
             if (proc.exec_log({"log",
                 "--date", std::format("{0}-01-01 00:00:00 to {0}-12-31 23:59:59", report_year),
-                "--template", "{author}#{date|shortdate}#{desc|firstline}\\n"})) {
+                "--template", "{author}#{date|shortdate}#{tags}#{desc|firstline}\\n"})) {
                 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
                 return EXIT_FAILURE;
             }
@@ -268,9 +268,11 @@
         } else {
             proc.setbin(settings.git);
             if (proc.exec_log({"log",
+                "--decorate=short",
+                "--decorate-refs=refs/tags/",
                 "--since", std::format("{0}-01-01 00:00:00", report_year),
                 "--until", std::format("{0}-12-31 23:59:59", report_year),
-                "--format=tformat:%an <%ae>#%cs#%s"})) {
+                "--format=tformat:%an <%ae>#%cs#%(decorate:prefix=,suffix=,tag=,separator= )#%s"})) {
                 fprintf(stderr, "Reading commit log for repo '%s' failed!\n", repo.path.c_str());
                 return EXIT_FAILURE;
             }

mercurial