@@ -17,7 +17,7 @@ push_subcommand::push_subcommand(const libgit2_object&, CLI::App& app)
1717 auto * sub = app.add_subcommand (" push" , " Update remote refs along with associated objects" );
1818
1919 sub->add_option (" <remote>" , m_remote_name, " The remote to push to" )->default_val (" origin" );
20- sub->add_option (" <refspec>" , m_refspecs, " The refspec(s) to push" )->expected (0 ,-1 );
20+ sub->add_option (" <refspec>" , m_refspecs, " The refspec(s) to push" )->expected (0 , -1 );
2121 sub->add_flag (
2222 " --all,--branches" ,
2323 m_branches_flag,
@@ -97,7 +97,10 @@ std::unordered_map<std::string, git_oid> get_remotes(repository_wrapper& repo, s
9797 return remotes_oids;
9898}
9999
100- std::unordered_map<std::string, git_oid> diff_branches (std::unordered_map<std::string, git_oid> remotes_before_push, std::unordered_map<std::string, git_oid> remotes_after_push)
100+ std::unordered_map<std::string, git_oid> diff_branches (
101+ std::unordered_map<std::string, git_oid> remotes_before_push,
102+ std::unordered_map<std::string, git_oid> remotes_after_push
103+ )
101104{
102105 std::unordered_map<std::string, git_oid> new_branches;
103106 for (const auto & br : remotes_after_push)
@@ -112,7 +115,8 @@ std::unordered_map<std::string, git_oid> diff_branches(std::unordered_map<std::s
112115 return new_branches;
113116}
114117
115- std::pair<std::vector<std::string>, std::vector<std::string>> split_refspecs (std::vector<std::string> refspecs, std::unordered_map<std::string, git_oid> new_branches)
118+ std::pair<std::vector<std::string>, std::vector<std::string>>
119+ split_refspecs (std::vector<std::string> refspecs, std::unordered_map<std::string, git_oid> new_branches)
116120{
117121 std::vector<std::string> new_pushed_refspecs;
118122 std::vector<std::string> existing_refspecs;
@@ -132,7 +136,8 @@ std::pair<std::vector<std::string>, std::vector<std::string>> split_refspecs(std
132136 return std::make_pair (new_pushed_refspecs, existing_refspecs);
133137}
134138
135- std::pair<std::string, std::string> get_branch_names (repository_wrapper& repo, std::string remote_name, std::string refspec)
139+ std::pair<std::string, std::string>
140+ get_branch_names (repository_wrapper& repo, std::string remote_name, std::string refspec)
136141{
137142 std::optional<std::string> upstream_opt = repo.branch_upstream_name (refspec);
138143 std::string remote_branch = refspec;
@@ -170,7 +175,7 @@ void push_subcommand::run()
170175
171176 fill_refspec (repo);
172177 std::vector<std::string> refspecs_push;
173- for (auto refspec: m_refspecs)
178+ for (auto refspec : m_refspecs)
174179 {
175180 refspecs_push.push_back (" refs/heads/" + refspec);
176181 }
0 commit comments