mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Open Replica read-only when possible (#3776)
* Open Replica read-only when possible Specifically, when either - the command is read-only; or - the command requires GC (including recurrence updates) but GC is disabled by config * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
a97deb0c84
commit
a701f8fc7d
9 changed files with 121 additions and 17 deletions
|
@ -61,7 +61,7 @@ int TEST_NAME(int, char**) {
|
|||
context.config.set("gc", 1);
|
||||
context.config.set("debug", 1);
|
||||
|
||||
context.tdb2.open_replica(".", true);
|
||||
context.tdb2.open_replica(".", /*create_if_missing=*/true, /*read_write=*/true);
|
||||
|
||||
// Try reading an empty database.
|
||||
std::vector<Task> pending = context.tdb2.pending_tasks();
|
||||
|
@ -108,7 +108,7 @@ int TEST_NAME(int, char**) {
|
|||
|
||||
// Reset for reuse.
|
||||
cleardb();
|
||||
context.tdb2.open_replica(".", true);
|
||||
context.tdb2.open_replica(".", /*create_if_missing=*/true, /*read_write=*/true);
|
||||
|
||||
// TODO complete a task
|
||||
// TODO gc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue