mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 04:27:20 +02:00
Context: GC now only called when the commands request it
This commit is contained in:
parent
0c85725a4c
commit
a604e14ea9
2 changed files with 3 additions and 7 deletions
|
@ -432,9 +432,9 @@ int Context::dispatch (std::string &out)
|
|||
Command* c = commands[command];
|
||||
assert (c);
|
||||
|
||||
// GC is invoked prior to running any command that displays task IDs, if
|
||||
// possible.
|
||||
if (c->displays_id () && !tdb2.read_only ())
|
||||
// The command know whether they need a GC.
|
||||
if (c->needs_gc () &&
|
||||
! tdb2.read_only ())
|
||||
{
|
||||
run_gc = config.getBoolean ("gc");
|
||||
tdb2.gc ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue