mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 04:27:20 +02:00
Code Cleanup
- Removed diagnostics from default command handling.
This commit is contained in:
parent
49aadb7636
commit
942e2ddbc1
1 changed files with 0 additions and 17 deletions
17
src/A3t.cpp
17
src/A3t.cpp
|
@ -425,9 +425,6 @@ void A3t::applyOverrides ()
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void A3t::injectDefaults ()
|
void A3t::injectDefaults ()
|
||||||
{
|
{
|
||||||
//std::cout << "#####################\n";
|
|
||||||
//std::cout << _tree->dump ();
|
|
||||||
|
|
||||||
// Scan the top-level branches for evidence of ID, UUID, overrides and other
|
// Scan the top-level branches for evidence of ID, UUID, overrides and other
|
||||||
// arguments.
|
// arguments.
|
||||||
bool found_command = false;
|
bool found_command = false;
|
||||||
|
@ -453,18 +450,13 @@ void A3t::injectDefaults ()
|
||||||
// If no command was specified, then a command will be inserted.
|
// If no command was specified, then a command will be inserted.
|
||||||
if (! found_command)
|
if (! found_command)
|
||||||
{
|
{
|
||||||
//std::cout << "# ! found_command\n";
|
|
||||||
|
|
||||||
// Default command.
|
// Default command.
|
||||||
if (! found_sequence)
|
if (! found_sequence)
|
||||||
{
|
{
|
||||||
//std::cout << "# ! found_sequence\n";
|
|
||||||
|
|
||||||
// Apply overrides, if any.
|
// Apply overrides, if any.
|
||||||
std::string defaultCommand = context.config.get ("default.command");
|
std::string defaultCommand = context.config.get ("default.command");
|
||||||
if (defaultCommand != "")
|
if (defaultCommand != "")
|
||||||
{
|
{
|
||||||
//std::cout << "# default_command\n";
|
|
||||||
context.debug ("No command or sequence found - assuming default.command.");
|
context.debug ("No command or sequence found - assuming default.command.");
|
||||||
Tree* t = captureFirst (defaultCommand);
|
Tree* t = captureFirst (defaultCommand);
|
||||||
t->tag ("DEFAULT");
|
t->tag ("DEFAULT");
|
||||||
|
@ -488,15 +480,11 @@ void A3t::injectDefaults ()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//std::cout << "# found_sequence\n";
|
|
||||||
|
|
||||||
// TODO There is a problem, in that this block is not run.
|
// TODO There is a problem, in that this block is not run.
|
||||||
|
|
||||||
// Information command.
|
// Information command.
|
||||||
if (! found_other)
|
if (! found_other)
|
||||||
{
|
{
|
||||||
//std::cout << "# ! found_other\n";
|
|
||||||
|
|
||||||
context.debug ("Sequence but no command found - assuming 'information' command.");
|
context.debug ("Sequence but no command found - assuming 'information' command.");
|
||||||
context.header (STRING_ASSUME_INFO);
|
context.header (STRING_ASSUME_INFO);
|
||||||
Tree* t = captureFirst ("information");
|
Tree* t = captureFirst ("information");
|
||||||
|
@ -504,11 +492,6 @@ void A3t::injectDefaults ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//else
|
|
||||||
// std::cout << "# found_command\n";
|
|
||||||
|
|
||||||
//std::cout << _tree->dump ();
|
|
||||||
//std::cout << "#####################\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue