From 2b316cf9bccc3608b439ddc69039377686350784 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 19 Jan 2023 11:13:33 +0100 Subject: GitRepo: Remove refspec argument in retrieving commit from remote... ...and use instead the branch name. A valid direct refspec (as those retrieved by a remote_ls call) will always end in the branch name, so checking the last path component ('/'-delimited substring) of a retrieved refspec is enough. --- src/other_tools/ops_maps/git_update_map.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/other_tools/ops_maps/git_update_map.cpp') diff --git a/src/other_tools/ops_maps/git_update_map.cpp b/src/other_tools/ops_maps/git_update_map.cpp index 73eccfe0..f2f6c3e5 100644 --- a/src/other_tools/ops_maps/git_update_map.cpp +++ b/src/other_tools/ops_maps/git_update_map.cpp @@ -51,10 +51,8 @@ auto CreateGitUpdateMap(GitCASPtr const& git_cas, std::size_t jobs) fatal); }); // update commit - auto refname = std::string("refs/heads/") + - key.second; // assume branch ref format auto new_commit = git_repo->UpdateCommitViaTmpRepo( - tmp_dir->GetPath(), key.first, refname, wrapped_logger); + tmp_dir->GetPath(), key.first, key.second, wrapped_logger); if (not new_commit) { return; } -- cgit v1.2.3