Skip to content

Commit c20f637

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 81d859a commit c20f637

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/subcommand/push_subcommand.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/wrapper/repository_wrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <iostream>
66
#include <optional>
77
#include <string_view>
8+
89
#include <git2/buffer.h>
910
#include <git2/oid.h>
1011
#include <git2/refs.h>

0 commit comments

Comments
 (0)