Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tools/RepositoryReport.hpp
diff options
context:
space:
mode:
authorLeitwolf112026-11-01 22:58:30 +0300
committerLeitwolf112026-11-01 22:58:30 +0300
commite66db1cf17714be2ebfeab37670ef3d8965fc7cc (patch)
tree88a8b55a14e9bc6152608662d062c1624c2863cf /tools/RepositoryReport.hpp
parente32c9d107274f42b9cca700475404c80e96533c5 (diff)
downloadcatch3-e66db1cf17714be2ebfeab37670ef3d8965fc7cc.tar.gz
Answer the review of the tools
repo_info starts Git in the checkout with fixed commands, so a shell never reads a path, reports an unknown state as null rather than clean, and counts only files it can start. third_party reads every archive before it changes a file and refuses two modes. version checks that the sources make a distribution, computes every place before writing any, and release_notes finds a three-number heading for a version with D = 0.
Diffstat (limited to 'tools/RepositoryReport.hpp')
-rw-r--r--tools/RepositoryReport.hpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/RepositoryReport.hpp b/tools/RepositoryReport.hpp
index 83ef85b7..57c5d5e5 100644
--- a/tools/RepositoryReport.hpp
+++ b/tools/RepositoryReport.hpp
@@ -3,6 +3,7 @@
#pragma once
#include <filesystem>
+#include <optional>
#include <string>
#include <vector>
@@ -27,12 +28,14 @@ namespace Progmasoft::Catch3::Tools
std::string EngineVersion;
std::string Branch;
std::string Revision;
- bool Dirty = false;
+ // Empty when Git could not say.
+ std::optional<bool> Dirty;
std::string GitError;
std::vector<ToolInfo> Tools;
};
- /// Reads the checkout at `root`, without changing anything.
+ /// Reads the checkout at `root`, without changing anything in it. It
+ /// leaves the process in `root`.
[[nodiscard]] RepositoryReport
CollectRepositoryReport(const std::filesystem::path &root);