diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2022-10-07 16:26:51 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2022-10-07 16:34:56 +0200 |
commit | 149fe52517653a3a5c2ef5f2be2ab09415eedba4 (patch) | |
tree | 5e223a08dee78bec91eaf4e6f94be653ca846f2a /src/buildtool/execution_api/local/local_api.hpp | |
parent | 947a1e16e8079592773c055e86d9c4cbb8c305a8 (diff) | |
download | justbuild-149fe52517653a3a5c2ef5f2be2ab09415eedba4.tar.gz |
Fix upload of known source trees
When a tree is taken from a git root, it is not necessarily known on
the remote site. So, as any missing artifact it has to be uploaded,
recursively uploading the parts to keep the tree invariant. The
function RetrieveToCas was doing the correct recursiv pattern, however
inspecting trees incorrectly using the function ReadTreeInfos; the
latter function, however, was obtaining all the leafs of the tree
as is needed for a compatible action-input description. Add and
use a function that reads the direct contents of a tree.
Diffstat (limited to 'src/buildtool/execution_api/local/local_api.hpp')
-rw-r--r-- | src/buildtool/execution_api/local/local_api.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/buildtool/execution_api/local/local_api.hpp b/src/buildtool/execution_api/local/local_api.hpp index 13bcb7e3..dd3bc4a0 100644 --- a/src/buildtool/execution_api/local/local_api.hpp +++ b/src/buildtool/execution_api/local/local_api.hpp @@ -134,7 +134,7 @@ class LocalApi final : public IExecutionApi { for (auto const& info : missing_artifacts_info) { // Recursively process trees. if (IsTreeObject(info.type)) { - auto const& infos = storage_->ReadTreeInfos( + auto const& infos = storage_->ReadTreeInfosDirect( info.digest, std::filesystem::path{}); if (not infos or not RetrieveToCas(infos->second, api)) { return false; |