@@ -147,7 +147,7 @@ void push_subcommand::run()
147147 {
148148 std::string up_remote = up_name.substr (0 , pos);
149149 std::string up_branch = up_name.substr (pos + 1 );
150- if (up_remote == remote_name)
150+ if (up_remote == remote_name)
151151 {
152152 remote_branch = up_name.substr (pos + 1 );
153153 remote_ref = " refs/heads/" + remote_branch;
@@ -168,7 +168,8 @@ void push_subcommand::run()
168168 if (auto ref_opt = repo.find_reference_dwim ((" refs/heads/" + local_short_name)))
169169 {
170170 const git_oid* target = ref_opt->target ();
171- local_oid_opt = *target; // TODO: pas comprenu pourquoi je ne peux pas faire local_oid_opt = ref_opt->target();
171+ local_oid_opt = *target; // TODO: pas comprenu pourquoi je ne peux pas faire local_oid_opt =
172+ // ref_opt->target();
172173 }
173174
174175 if (!local_oid_opt)
@@ -183,8 +184,8 @@ void push_subcommand::run()
183184 std::string old_hex = oid_to_hex (remote_oid);
184185 std::string new_hex = oid_to_hex (local_oid);
185186 // TODO: check order of hex codes
186- std::cout << " " << old_hex.substr (0 , 7 ) << " .." << new_hex.substr (0 , 7 )
187- << " " << local_short_name << " -> " << local_short_name << std::endl;
187+ std::cout << " " << old_hex.substr (0 , 7 ) << " .." << new_hex.substr (0 , 7 ) << " "
188+ << local_short_name << " -> " << local_short_name << std::endl;
188189 }
189190 }
190191}
0 commit comments