Rename 'expiration.on-sync' to 'purge.on-sync' (#3556)

Taskwarrior uses "expire" to refer to deletion of tasks past their
"until" date, so let's use `purge` to link this semantically to the
`task purge` command.
This commit is contained in:
Dustin J. Mitchell 2024-07-14 15:45:26 -04:00 committed by GitHub
parent 1304d6361c
commit 7d79b9e516
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 57 additions and 99 deletions

View file

@ -118,7 +118,7 @@ std::string configurationDefaults =
"json.array=1 # Enclose JSON output in [ ]\n"
"abbreviation.minimum=2 # Shortest allowed abbreviation\n"
"news.version= # Latest version highlights read by the user\n"
"expiration.on-sync=0 # Expire old tasks on sync\n"
"purge.on-sync=0 # Purge old tasks on sync\n"
"\n"
"# Dates\n"
"dateformat=Y-M-D # Preferred input and display date format\n"

View file

@ -542,7 +542,7 @@ void NewsItem::version3_1_0 (std::vector<NewsItem>& items) {
Version version("3.1.0");
NewsItem sync {
version,
/*title=*/"Purging and Expiring Tasks",
/*title=*/"Purging Tasks, Manually or Automatically",
/*bg_title=*/"",
/*background=*/"",
/*punchline=*/
@ -552,7 +552,7 @@ void NewsItem::version3_1_0 (std::vector<NewsItem>& items) {
"The `task purge` command removes tasks entirely, in contrast to `task delete` which merely sets\n"
"the task status to 'Deleted'. This functionality existed in versions 2.x but was temporarily\n"
"removed in 3.0.\n\n"
"The new `expiration.on-sync` configuration parameter controls automatic expiration of old tasks.\n"
"The new `purge.on-sync` configuration parameter controls automatic purging of old tasks.\n"
"An old task is one with status 'Deleted' that has not been modified in 180 days. This\n"
"functionality is optional and not enabled by default."
};

View file

@ -160,7 +160,7 @@ int CmdShow::execute (std::string& output)
" due"
" editor"
" exit.on.missing.db"
" expiration.on-sync"
" purge.on-sync"
" expressions"
" fontunderline"
" gc"

View file

@ -109,7 +109,7 @@ int CmdSync::execute (std::string& output)
Context &context = Context::getContext ();
context.tdb2.sync(std::move(server), false);
if (context.config.getBoolean ("expiration.on-sync")) {
if (context.config.getBoolean ("purge.on-sync")) {
context.tdb2.expire_tasks ();
}