diff --git a/src/TDB.cpp b/src/TDB.cpp index 3545392ac..39d7d0c30 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -612,9 +612,6 @@ int TDB::gc () std::vector 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 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); } + } } }