Skip to content

Commit 7ef1c15

Browse files
committed
address review comments
1 parent c3b5ce4 commit 7ef1c15

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/subcommand/diff_subcommand.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,30 @@ static int colour_printer([[maybe_unused]] const git_diff_delta* delta, [[maybe_
179179
if (delta->status == GIT_DELTA_COPIED)
180180
{
181181
if (use_colour)
182-
std::cout << termcolor::bold;
182+
{
183+
std::cout << termcolor::bold;
184+
}
183185
std::cout << "similarity index " << delta->similarity << "%\n";
184186
std::cout << "copy from " << delta->old_file.path << "\n";
185187
std::cout << "copy to " << delta->new_file.path << "\n";
186188
if (use_colour)
187-
std::cout << termcolor::reset;
189+
{
190+
std::cout << termcolor::reset;
191+
}
188192
}
189193
else if (delta->status == GIT_DELTA_RENAMED)
190194
{
191195
if (use_colour)
192-
std::cout << termcolor::bold;
196+
{
197+
std::cout << termcolor::bold;
198+
}
193199
std::cout << "similarity index " << delta->similarity << "%\n";
194200
std::cout << "rename from " << delta->old_file.path << "\n";
195201
std::cout << "rename to " << delta->new_file.path << "\n";
196202
if (use_colour)
197-
std::cout << termcolor::reset;
203+
{
204+
std::cout << termcolor::reset;
205+
}
198206
}
199207
}
200208

@@ -286,10 +294,6 @@ void diff_subcommand::run()
286294
git_diff_options diffopts;
287295
git_diff_options_init(&diffopts, GIT_DIFF_OPTIONS_VERSION);
288296

289-
std::cerr << "DEBUG cached=" << m_cached_flag
290-
<< " no_index=" << m_no_index_flag
291-
<< " files=" << m_files.size() << "\n";
292-
293297
bool use_colour = false;
294298
if (m_no_colour_flag)
295299
{

0 commit comments

Comments
 (0)