summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/git_repo.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-11-27 17:36:43 +0100
committerKlaus Aehlig <klaus.aehlig@huawei.com>2024-12-03 11:28:48 +0100
commit2e94df845a434f19f634d6605061428512c2302f (patch)
treec7917787bc64182cfa5d4e8d5b009c6faec36901 /src/buildtool/file_system/git_repo.hpp
parent617bde473a2d2cb394a20f3899f21ddfaafdae8b (diff)
downloadjustbuild-2e94df845a434f19f634d6605061428512c2302f.tar.gz
Ensure gitstrarray gets created with alive pointers.
(cherry-picked from 9dc61e9faca5e8b05a1a2a2eed83a5468aeb6202)
Diffstat (limited to 'src/buildtool/file_system/git_repo.hpp')
-rw-r--r--src/buildtool/file_system/git_repo.hpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/buildtool/file_system/git_repo.hpp b/src/buildtool/file_system/git_repo.hpp
index df100b35..a937dc18 100644
--- a/src/buildtool/file_system/git_repo.hpp
+++ b/src/buildtool/file_system/git_repo.hpp
@@ -380,11 +380,7 @@ class GitRepo {
class GitStrArray final {
public:
- void AddEntry(std::string entry) {
- char* const entry_ptr =
- entries_.emplace_back(std::move(entry)).data();
- entry_pointers_.push_back(entry_ptr);
- }
+ void AddEntry(std::string entry);
[[nodiscard]] auto Get() & noexcept -> git_strarray;
private: