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 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.cpp b/src/buildtool/serve_api/serve_service/source_tree.cpp index 567d61bb..5aae6e07 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.cpp +++ b/src/buildtool/serve_api/serve_service/source_tree.cpp @@ -461,7 +461,7 @@ auto SourceTreeService::ResolveContentTree( } auto SourceTreeService::CommonImportToGit( - std::filesystem::path const& content_path, + std::filesystem::path const& root_path, std::string const& commit_message) -> expected<std::string, std::string> { // the repository path that imports the content must be separate from the // content path, to avoid polluting the entries @@ -481,18 +481,18 @@ auto SourceTreeService::CommonImportToGit( // wrap logger for GitRepo call std::string err; auto wrapped_logger = std::make_shared<GitRepo::anon_logger_t>( - [content_path, repo_path, &err](auto const& msg, bool fatal) { + [&root_path, &repo_path, &err](auto const& msg, bool fatal) { if (fatal) { err = fmt::format( "While committing directory {} in repository {}:\n{}", - content_path.string(), + root_path.string(), repo_path.string(), msg); } }); // stage and commit all auto commit_hash = - git_repo->CommitDirectory(content_path, commit_message, wrapped_logger); + git_repo->CommitDirectory(root_path, commit_message, wrapped_logger); if (not commit_hash) { return unexpected{err}; } |