mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Apply 'one sentence, one line' to some comments
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
ac2e94064f
commit
592f4b8b6e
1 changed files with 7 additions and 11 deletions
18
src/init.cpp
18
src/init.cpp
|
@ -80,8 +80,7 @@ void initializeEntities (CLI& cli)
|
||||||
cli.entity ("command", "undo");
|
cli.entity ("command", "undo");
|
||||||
cli.entity ("command", "untag");
|
cli.entity ("command", "untag");
|
||||||
|
|
||||||
// Some command list themselves as extensions, to integrate with the real
|
// Some command list themselves as extensions, to integrate with the real extensions.
|
||||||
// extensions.
|
|
||||||
cli.entity ("extension", "day");
|
cli.entity ("extension", "day");
|
||||||
cli.entity ("extension", "month");
|
cli.entity ("extension", "month");
|
||||||
cli.entity ("extension", "summary");
|
cli.entity ("extension", "summary");
|
||||||
|
@ -149,8 +148,7 @@ void initializeDataJournalAndRules (
|
||||||
|
|
||||||
enableDebugMode (rules.getBoolean ("debug"));
|
enableDebugMode (rules.getBoolean ("debug"));
|
||||||
|
|
||||||
// The $TIMEWARRIORDB environment variable overrides the default value of
|
// The $TIMEWARRIORDB environment variable overrides the default value of ~/.timewarrior
|
||||||
// ~/.timewarrior‥
|
|
||||||
Directory dbLocation;
|
Directory dbLocation;
|
||||||
char* override = getenv ("TIMEWARRIORDB");
|
char* override = getenv ("TIMEWARRIORDB");
|
||||||
dbLocation = Directory (override ? override : "~/.timewarrior");
|
dbLocation = Directory (override ? override : "~/.timewarrior");
|
||||||
|
@ -195,13 +193,12 @@ void initializeDataJournalAndRules (
|
||||||
}
|
}
|
||||||
rules.load (configFile._data);
|
rules.load (configFile._data);
|
||||||
|
|
||||||
// This value is not written out to disk, as there would be no point. Having
|
// This value is not written out to disk, as there would be no point.
|
||||||
// located the config file, the 'db' location is already known. This is just
|
// Having located the config file, the 'db' location is already known.
|
||||||
// for subsequent internal use.
|
// This is just for subsequent internal use.
|
||||||
rules.set ("temp.db", dbLocation._data);
|
rules.set ("temp.db", dbLocation._data);
|
||||||
|
|
||||||
// Perhaps some subsequent code would like to know this is a new db and
|
// Perhaps some subsequent code would like to know this is a new db and possibly a first run.
|
||||||
// possibly a first run.
|
|
||||||
if (shinyNewDatabase)
|
if (shinyNewDatabase)
|
||||||
rules.set ("temp.shiny", 1);
|
rules.set ("temp.shiny", 1);
|
||||||
|
|
||||||
|
@ -265,8 +262,7 @@ int dispatchCommand (
|
||||||
|
|
||||||
if (! command.empty ())
|
if (! command.empty ())
|
||||||
{
|
{
|
||||||
// These signatures are expected to be all different, therefore no
|
// These signatures are expected to be all different, therefore no command to fn mapping.
|
||||||
// command to fn mapping.
|
|
||||||
if (command == "annotate") status = CmdAnnotate (cli, rules, database, journal );
|
if (command == "annotate") status = CmdAnnotate (cli, rules, database, journal );
|
||||||
else if (command == "cancel") status = CmdCancel ( rules, database, journal );
|
else if (command == "cancel") status = CmdCancel ( rules, database, journal );
|
||||||
else if (command == "config") status = CmdConfig (cli, rules, journal );
|
else if (command == "config") status = CmdConfig (cli, rules, journal );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue