From 6377b2e150857ccf52269a0251dfcd201f9b296f Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 31 Oct 2023 14:50:45 +0100 Subject: commit_git_map fix: Fetch from correct location if fetch URL is a path --- src/other_tools/root_maps/commit_git_map.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/other_tools/root_maps/commit_git_map.cpp') diff --git a/src/other_tools/root_maps/commit_git_map.cpp b/src/other_tools/root_maps/commit_git_map.cpp index f4ee1c17..40399811 100644 --- a/src/other_tools/root_maps/commit_git_map.cpp +++ b/src/other_tools/root_maps/commit_git_map.cpp @@ -86,6 +86,7 @@ void WriteIdFileAndSetWSRoot(std::string const& root_tree_id, void EnsureCommit(GitRepoInfo const& repo_info, std::filesystem::path const& repo_root, + std::string const& fetch_repo, GitCASPtr const& git_cas, gsl::not_null const& critical_git_op_map, gsl::not_null const& import_to_git_map, @@ -361,7 +362,7 @@ void EnsureCommit(GitRepoInfo const& repo_info, fatal); }); if (not git_repo->FetchViaTmpRepo(tmp_dir->GetPath(), - repo_info.repo_url, + fetch_repo, repo_info.branch, git_bin, launcher, @@ -386,7 +387,7 @@ void EnsureCommit(GitRepoInfo const& repo_info, "{} for remote {}", repo_info.hash, repo_info.branch, - repo_info.repo_url), + fetch_repo), /*fatal=*/true); return; } @@ -534,6 +535,7 @@ auto CreateCommitGitMap( {std::move(op_key)}, [key, repo_root, + fetch_repo, critical_git_op_map, import_to_git_map, git_bin, @@ -564,6 +566,7 @@ auto CreateCommitGitMap( }); EnsureCommit(key, repo_root, + fetch_repo, op_result.git_cas, critical_git_op_map, import_to_git_map, -- cgit v1.2.3