Skip to content

Commit 0fe48d5

Browse files
committed
adress review comment
1 parent eedd91f commit 0fe48d5

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/subcommand/status_subcommand.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ status_subcommand::status_subcommand(const libgit2_object&, CLI::App& app)
1414
{
1515
auto *sub = app.add_subcommand("status", "Show modified files in working directory, staged for your next commit");
1616

17-
sub->add_flag("-s,--short", m_fl.m_short_flag, "Give the output in the short-format.");
18-
sub->add_flag("--long", m_fl.m_long_flag, "Give the output in the long-format. This is the default.");
17+
sub->add_flag("-s,--short", m_options.m_short_flag, "Give the output in the short-format.");
18+
sub->add_flag("--long", m_options.m_long_flag, "Give the output in the long-format. This is the default.");
1919
// sub->add_flag("--porcelain[=<version>]", porcelain, "Give the output in an easy-to-parse format for scripts.
2020
// This is similar to the short output, but will remain stable across Git versions and regardless of user configuration.
2121
// See below for details. The version parameter is used to specify the format version. This is optional and defaults
2222
// to the original version v1 format.");
23-
sub->add_flag("-b,--branch", m_fl.m_branch_flag, "Show the branch and tracking info even in short-format.");
23+
sub->add_flag("-b,--branch", m_options.m_branch_flag, "Show the branch and tracking info even in short-format.");
2424

2525
sub->callback([this]() { this->run(); });
2626
};
@@ -163,10 +163,10 @@ void print_not_tracked(const std::vector<print_entry>& entries_to_print, const s
163163

164164
void status_subcommand::run()
165165
{
166-
status_run(m_fl);
166+
status_run(m_options);
167167
}
168168

169-
void status_run(status_subcommand_flags fl)
169+
void status_run(status_subcommand_options options)
170170
{
171171
auto directory = get_current_git_path();
172172
auto repo = repository_wrapper::open(directory);
@@ -179,11 +179,11 @@ void status_run(status_subcommand_flags fl)
179179
std::vector<std::string> ignored_to_print{};
180180

181181
output_format of = output_format::DEFAULT;
182-
if (fl.m_short_flag)
182+
if (options.m_short_flag)
183183
{
184184
of = output_format::SHORT;
185185
}
186-
if (fl.m_long_flag)
186+
if (options.m_long_flag)
187187
{
188188
of = output_format::LONG;
189189
}
@@ -210,7 +210,7 @@ void status_run(status_subcommand_flags fl)
210210
}
211211
else
212212
{
213-
if (fl.m_branch_flag)
213+
if (options.m_branch_flag)
214214
{
215215
std::cout << "## " << branch_name << std::endl;
216216
}

src/subcommand/status_subcommand.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include "../utils/common.hpp"
66

7-
struct status_subcommand_flags
7+
struct status_subcommand_options
88
{
99
bool m_branch_flag = false;
1010
bool m_long_flag = false;
@@ -19,7 +19,7 @@ class status_subcommand
1919
void run();
2020

2121
private:
22-
status_subcommand_flags m_fl;
22+
status_subcommand_options m_options;
2323
};
2424

25-
void status_run(status_subcommand_flags fl = {});
25+
void status_run(status_subcommand_options fl = {});

0 commit comments

Comments
 (0)