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.
This commit is contained in:
@@ -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 ())
|
||||
|
||||
Reference in New Issue
Block a user