mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Feature #561
- Added ability to temporarily suspend GC (rc.gc:0) for a given command, which helps scriptwriters implement shadow files externally (thanks to Sander Marechal).
This commit is contained in:
parent
5bf8feefca
commit
0ac2b43ad3
5 changed files with 11 additions and 0 deletions
|
@ -60,6 +60,7 @@ std::string Config::defaults =
|
|||
"# Files\n"
|
||||
"data.location=~/.task\n"
|
||||
"locking=on # Use file-level locking\n"
|
||||
"gc=on # Garbage-collect data files - DO NOT CHANGE unless you are sure\n"
|
||||
"\n"
|
||||
"# Terminal\n"
|
||||
"curses=on # Use ncurses library to determine terminal width\n"
|
||||
|
|
|
@ -596,6 +596,10 @@ int TDB::gc ()
|
|||
{
|
||||
Timer t ("TDB::gc");
|
||||
|
||||
// Allowed as a temporary override.
|
||||
if (!context.config.getBoolean ("gc"))
|
||||
return 0;
|
||||
|
||||
int count_pending_changes = 0;
|
||||
int count_completed_changes = 0;
|
||||
Date now;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue