diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-08-19 12:50:42 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-08-26 11:36:34 +0200 |
commit | 16708110d85714d6ca02623be0cbc99f387e3b77 (patch) | |
tree | 3b4de9edc7567a3115d5236649cff4f2b0d22ecf /src/other_tools/git_operations | |
parent | 426f01ee6be96f3ad7298c09adbe5297e3537f1d (diff) | |
download | justbuild-16708110d85714d6ca02623be0cbc99f387e3b77.tar.gz |
GitOpParams: Remove unneeded branch field
The 'branch' field is deprecated, not being used by any of the
critical Git operations, thus it can be removed.
Diffstat (limited to 'src/other_tools/git_operations')
-rw-r--r-- | src/other_tools/git_operations/git_ops_types.hpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/other_tools/git_operations/git_ops_types.hpp b/src/other_tools/git_operations/git_ops_types.hpp index 7c4b03a5..3dfdd4a8 100644 --- a/src/other_tools/git_operations/git_ops_types.hpp +++ b/src/other_tools/git_operations/git_ops_types.hpp @@ -27,27 +27,23 @@ struct GitOpParams { std::filesystem::path target_path{}; /*key*/ std::string git_hash{}; /*key*/ - std::string branch{}; /*key*/ std::optional<std::string> message{ std::nullopt}; // useful for commits and tags std::optional<bool> init_bare{std::nullopt}; // useful for git init GitOpParams(std::filesystem::path const& target_path_, std::string git_hash_, - std::string branch_, std::optional<std::string> message_ = std::nullopt, std::optional<bool> init_bare_ = std::nullopt) : target_path{std::filesystem::absolute(ToNormalPath(target_path_))}, git_hash{std::move(git_hash_)}, - branch{std::move(branch_)}, message{std::move(message_)}, init_bare{init_bare_} {}; [[nodiscard]] auto operator==(GitOpParams const& other) const noexcept -> bool { // not all fields are keys - return target_path == other.target_path and - git_hash == other.git_hash and branch == other.branch; + return target_path == other.target_path and git_hash == other.git_hash; } }; |