mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
TDB2
- Fixed a bug, or rather a side-effect of more efficient i/o. Now that a TDB2::GC call does not write out files until the final TDB2::commit, the GC has the effect of not modifying task IDs based on shuffling tasks between pending.data and completed.data until the next command. Fixed.
This commit is contained in:
parent
776bfea402
commit
dcd0bd1de7
1 changed files with 4 additions and 0 deletions
|
@ -1607,11 +1607,15 @@ int TDB2::gc ()
|
|||
pending.clear ();
|
||||
pending._dirty = true;
|
||||
pending._loaded_tasks = true;
|
||||
_id = 1;
|
||||
|
||||
for (task = pending_tasks_after.begin ();
|
||||
task != pending_tasks_after.end ();
|
||||
++task)
|
||||
{
|
||||
task->id = _id++;
|
||||
pending._tasks.push_back (*task);
|
||||
}
|
||||
|
||||
// Note: deliberately no commit.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue