diff options
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.cpp')
-rw-r--r-- | src/buildtool/serve_api/serve_service/source_tree.cpp | 12 |
1 files changed, 6 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 8a45365d..f78c4f2c 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.cpp +++ b/src/buildtool/serve_api/serve_service/source_tree.cpp @@ -576,7 +576,7 @@ auto SourceTreeService::ResolveContentTree( }); { // this is a non-thread-safe Git operation, so it must be guarded! - std::unique_lock slock{mutex_}; + std::unique_lock slock{*lock_}; // open real repository at Git CAS location auto git_repo = GitRepo::Open(native_context_->storage_config->GitRoot()); @@ -626,7 +626,7 @@ auto SourceTreeService::ArchiveImportToGit( unpack_path, /*commit_message=*/ fmt::format("Content of {} {}", archive_type, content), - &mutex_); + lock_); if (not res) { // report the error logger_->Emit(LogLevel::Error, "{}", res.error()); @@ -946,7 +946,7 @@ auto SourceTreeService::DistdirImportToGit( *native_context_->storage_config, tmp_path, /*commit_message=*/fmt::format("Content of distdir {}", content_id), - &mutex_); + lock_); if (not res) { // report the error logger_->Emit(LogLevel::Error, "{}", res.error()); @@ -1564,7 +1564,7 @@ auto SourceTreeService::CheckRootTree( *native_context_->storage_config, tmp_dir->GetPath(), /*commit_message=*/fmt::format("Content of tree {}", tree_id), - &mutex_); + lock_); if (not res) { // report the error logger_->Emit(LogLevel::Error, "{}", res.error()); @@ -1654,7 +1654,7 @@ auto SourceTreeService::GetRemoteTree( tmp_dir->GetPath(), /*commit_message=*/ fmt::format("Content of tree {}", remote_digest->hash()), - &mutex_); + lock_); if (not res) { // report the error logger_->Emit(LogLevel::Error, "{}", res.error()); @@ -1714,7 +1714,7 @@ auto SourceTreeService::ComputeTreeStructure( *tree_digest, known_repositories, *native_context_->storage_config, - &mutex_)) { + lock_)) { tree_structure = std::move(from_local).value(); } else { |