diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-26 13:05:35 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-07-05 12:58:35 +0200 |
commit | 3440784e94de51c95d3dcca8509f8e46b4722ee6 (patch) | |
tree | 42b096e1766aa3706adf02b93508d721bed66efd /src/buildtool/serve_api/serve_service/source_tree.cpp | |
parent | 595b7c27d175b56bd296b33dc535818a05cdbadd (diff) | |
download | justbuild-3440784e94de51c95d3dcca8509f8e46b4722ee6.tar.gz |
Pass Storage and StorageConfig to StorageUtils by reference
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp')
-rw-r--r-- | src/buildtool/serve_api/serve_service/source_tree.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp index 8be074fc..75dab8c2 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.cpp +++ b/src/buildtool/serve_api/serve_service/source_tree.cpp @@ -374,8 +374,8 @@ auto SourceTreeService::ResolveContentTree( ServeArchiveTreeResponse* response) -> ::grpc::Status { if (resolve_special) { // get the resolved tree - auto tree_id_file = - StorageUtils::GetResolvedTreeIDFile(tree_id, *resolve_special); + auto tree_id_file = StorageUtils::GetResolvedTreeIDFile( + StorageConfig::Instance(), tree_id, *resolve_special); if (FileSystemManager::Exists(tree_id_file)) { // read resolved tree id auto resolved_tree_id = FileSystemManager::ReadFile(tree_id_file); @@ -711,8 +711,8 @@ auto SourceTreeService::ServeArchiveTree( SymlinksResolveToPragmaSpecial(request->resolve_symlinks()); // check for archive_tree_id_file - auto archive_tree_id_file = - StorageUtils::GetArchiveTreeIDFile(archive_type, content); + auto archive_tree_id_file = StorageUtils::GetArchiveTreeIDFile( + StorageConfig::Instance(), archive_type, content); if (FileSystemManager::Exists(archive_tree_id_file)) { // read archive_tree_id from file tree_id_file auto archive_tree_id = @@ -792,7 +792,8 @@ auto SourceTreeService::ServeArchiveTree( StorageConfig::Instance().GitRoot(), content, logger_); if (res) { // add to CAS - content_cas_path = StorageUtils::AddToCAS(*res); + content_cas_path = + StorageUtils::AddToCAS(Storage::Instance(), *res); } if (res.error() == GitLookupError::Fatal) { logger_->Emit( @@ -810,7 +811,8 @@ auto SourceTreeService::ServeArchiveTree( auto res = GetBlobFromRepo(path, content, logger_); if (res) { // add to CAS - content_cas_path = StorageUtils::AddToCAS(*res); + content_cas_path = + StorageUtils::AddToCAS(Storage::Instance(), *res); if (content_cas_path) { break; } |