diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-05-26 14:46:25 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-04 14:34:44 +0200 |
commit | 811e9be4cc9604dba3d768639444c0d9f849a3c7 (patch) | |
tree | 15460350b2554be422b76c0cc817a4e5d8a1421e /src/buildtool/serve_api/remote/serve_api.cpp | |
parent | 8d4f583d63c657397583f778096b8bcb6d96c12f (diff) | |
download | justbuild-811e9be4cc9604dba3d768639444c0d9f849a3c7.tar.gz |
RepositoryConfig: Give access to a persistent storage config...
...whenever it is given access to a Git repository.
The referenced storage config needs to outlive the repository
config instance.
Diffstat (limited to 'src/buildtool/serve_api/remote/serve_api.cpp')
-rw-r--r-- | src/buildtool/serve_api/remote/serve_api.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/buildtool/serve_api/remote/serve_api.cpp b/src/buildtool/serve_api/remote/serve_api.cpp index 107f4439..44755820 100644 --- a/src/buildtool/serve_api/remote/serve_api.cpp +++ b/src/buildtool/serve_api/remote/serve_api.cpp @@ -35,8 +35,10 @@ auto ServeApi::UploadTree(ArtifactDigest const& tree, fmt::format("Not a git tree: {}", tree.hash()), not kIsSyncError}}; } + // Set up the repository config; compatibility of used storage instance is + // irrelevant here, as only the build root path info is needed. RepositoryConfig repo; - if (not repo.SetGitCAS(git_repo)) { + if (not repo.SetGitCAS(git_repo, &storage_config_)) { return unexpected{UploadError{ fmt::format("Failed to SetGitCAS at {}", git_repo.string()), not kIsSyncError}}; |