1313status_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" );
16- // Displays paths that have differences between the index file and the current HEAD commit,
17- // paths that have differences between the working tree and the index file, and paths in the
18- // working tree that are not tracked by Git (and are not ignored by gitignore[5]).
19- // The first are what you would commit by running git commit;
20- // the second and third are what you could commit by running git add before running git commit.
2116
22- sub->add_flag (" -s,--short" , short_flag , " Give the output in the short-format." );
23- sub->add_flag (" --long" , long_flag , " Give the output in the long-format. This is the default." );
17+ sub->add_flag (" -s,--short" , m_short_flag , " Give the output in the short-format." );
18+ sub->add_flag (" --long" , m_long_flag , " Give the output in the long-format. This is the default." );
2419 // sub->add_flag("--porcelain[=<version>]", porcelain, "Give the output in an easy-to-parse format for scripts.
2520 // This is similar to the short output, but will remain stable across Git versions and regardless of user configuration.
2621 // See below for details. The version parameter is used to specify the format version. This is optional and defaults
2722 // to the original version v1 format.");
28- sub->add_flag (" -b,--branch" , branch_flag , " Show the branch and tracking info even in short-format." );
23+ sub->add_flag (" -b,--branch" , m_branch_flag , " Show the branch and tracking info even in short-format." );
2924
3025 sub->callback ([this ]() { this ->run (); });
3126};
@@ -152,7 +147,7 @@ void print_entries(std::vector<print_entry> entries_to_print)
152147 }
153148}
154149
155- void print_not_tracked (std::vector<print_entry> entries_to_print, const std::set<std::string>& tracked_dir_set,
150+ void print_not_tracked (const std::vector<print_entry>& entries_to_print, const std::set<std::string>& tracked_dir_set,
156151 std::set<std::string>& untracked_dir_set)
157152{
158153 std::vector<print_entry> not_tracked_entries_to_print{};
@@ -199,11 +194,11 @@ void status_subcommand::run()
199194 std::vector<std::string> ignored_to_print{};
200195
201196 output_format of = output_format::DEFAULT;
202- if (short_flag )
197+ if (m_short_flag )
203198 {
204199 of = output_format::SHORT;
205200 }
206- if (long_flag )
201+ if (m_long_flag )
207202 {
208203 of = output_format::LONG;
209204 }
@@ -220,7 +215,7 @@ void status_subcommand::run()
220215 }
221216 else
222217 {
223- if (branch_flag )
218+ if (m_branch_flag )
224219 {
225220 std::cout << " ## " << branch_name << std::endl;
226221 }
0 commit comments