From 16708110d85714d6ca02623be0cbc99f387e3b77 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 19 Aug 2024 12:50:42 +0200 Subject: 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. --- src/other_tools/git_operations/git_ops_types.hpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/other_tools/git_operations') 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 message{ std::nullopt}; // useful for commits and tags std::optional init_bare{std::nullopt}; // useful for git init GitOpParams(std::filesystem::path const& target_path_, std::string git_hash_, - std::string branch_, std::optional message_ = std::nullopt, std::optional 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; } }; -- cgit v1.2.3