diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-01-19 11:13:33 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-01-24 15:47:31 +0100 |
commit | 2b316cf9bccc3608b439ddc69039377686350784 (patch) | |
tree | 2e00926ca30ef55e3ae66c381ea5a0e650173de7 /src/other_tools/ops_maps/git_update_map.cpp | |
parent | 51130a4ef9bfb4139ffb748d1e0e4f491a442bfd (diff) | |
download | justbuild-2b316cf9bccc3608b439ddc69039377686350784.tar.gz |
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.
Diffstat (limited to 'src/other_tools/ops_maps/git_update_map.cpp')
-rw-r--r-- | src/other_tools/ops_maps/git_update_map.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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; } |