summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_engine/executor/executor.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-05-16 15:02:05 +0200
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-05-21 15:09:49 +0200
commite63a782a71a0edbe67b035b03d41043009774643 (patch)
tree1401805df2fbe2f1c33d95899e9a71c2af51c27f /src/buildtool/execution_engine/executor/executor.hpp
parent9e888fe80a835b084a28f7b9cb4b5759b4eaf47a (diff)
downloadjustbuild-e63a782a71a0edbe67b035b03d41043009774643.tar.gz
FileRoot: Fix parsing of ignore-special Git tree roots
When populating the GitTree instance stored in a Git tree-type FileRoot with the ignore-special flag set, the GitTree instance would be created with an empty raw_id_ field, signaling that some of the entries might have been skipped and thus the root tree id is not anymore in a one-to-one correspondence with the stored list of entries. This however caused FileRoot instances with missing tree id information. This commit fixes the issue by always storing the raw_id_ field as the root id of the Git tree, as well as clarifying the relationship between this field and the ignore_special_ flag, including refactoring the tree id getters. (cherry picked from 06336198a38ffaec6c35df34580391579a7a7b22)
Diffstat (limited to 'src/buildtool/execution_engine/executor/executor.hpp')
-rw-r--r--src/buildtool/execution_engine/executor/executor.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/buildtool/execution_engine/executor/executor.hpp b/src/buildtool/execution_engine/executor/executor.hpp
index f7afb077..b7ca034c 100644
--- a/src/buildtool/execution_engine/executor/executor.hpp
+++ b/src/buildtool/execution_engine/executor/executor.hpp
@@ -269,7 +269,8 @@ class ExecutorImpl {
Logger::Log(LogLevel::Trace, [&tree]() {
std::ostringstream oss{};
- oss << "upload directory content of " << tree.Hash() << std::endl;
+ oss << "upload directory content of " << tree.FileRootHash()
+ << std::endl;
for (auto const& [path, entry] : tree) {
oss << fmt::format(" - {}: {}", path, entry->Hash())
<< std::endl;
@@ -344,7 +345,7 @@ class ExecutorImpl {
if (not VerifyOrUploadTree(api, *tree)) {
Logger::Log(LogLevel::Error,
"failed to verifyorupload git tree {} [{}]",
- tree->Hash(),
+ tree->FileRootHash(),
hash);
return false;
}