From c4c25706ac9846b90f50471023a6693ffb8629be Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 8 Sep 2014 00:08:05 -0400 Subject: [PATCH] Context - Removed the auto_commit feature, because now every command call TDB2::commit, in case a hook script generated new tasks. This is harmless in NOP situations. --- src/Context.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Context.cpp b/src/Context.cpp index 8063336ad..ac7e09794 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -392,15 +392,12 @@ int Context::dispatch (std::string &out) updateVerbosity (); Command* c = commands[command]; + assert (c); // GC is invoked prior to running any command that displays task IDs, if // possible. - bool auto_commit = false; if (c->displays_id () && !tdb2.read_only ()) - { tdb2.gc (); - auto_commit = true; - } // Only read-only commands can be run when TDB2 is read-only. // TODO Implement TDB2::read_only @@ -410,8 +407,6 @@ int Context::dispatch (std::string &out) */ int rc = c->execute (out); - if (auto_commit) - tdb2.commit (); // Write commands cause an update of the shadow file, if configured. if (! c->read_only ())