mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug
- Fixed GC bug that attempted to clean up dangling dependencies but actually failed to update the tasks.
This commit is contained in:
parent
8823ba5bfa
commit
2708b37ce5
1 changed files with 6 additions and 6 deletions
12
src/TDB.cpp
12
src/TDB.cpp
|
@ -612,9 +612,6 @@ int TDB::gc ()
|
|||
std::vector <Task> ignore;
|
||||
loadPending (ignore, filter);
|
||||
|
||||
// TODO This whole idea of removing dangling dependencies is suspect. I'm not
|
||||
// sure it should be included.
|
||||
|
||||
// Search for dangling dependencies. These are dependencies whose uuid cannot
|
||||
// be converted to an id by TDB.
|
||||
std::vector <std::string> deps;
|
||||
|
@ -625,14 +622,17 @@ int TDB::gc ()
|
|||
deps.clear ();
|
||||
task->getDependencies (deps);
|
||||
foreach (dep, deps)
|
||||
{
|
||||
if (id (*dep) == 0)
|
||||
{
|
||||
task->removeDependency (*dep);
|
||||
++count_pending_changes;
|
||||
context.debug ("GC: Removed dangling dependency "
|
||||
+ *dep
|
||||
+ " from "
|
||||
+ task->get ("uuid"));
|
||||
+ task->get ("uuid")
|
||||
+ " -> "
|
||||
+ *dep);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue