mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-29 17:07:19 +02:00
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:
parent
f0a2f0d70e
commit
c4c25706ac
1 changed files with 1 additions and 6 deletions
|
@ -392,15 +392,12 @@ int Context::dispatch (std::string &out)
|
||||||
updateVerbosity ();
|
updateVerbosity ();
|
||||||
|
|
||||||
Command* c = commands[command];
|
Command* c = commands[command];
|
||||||
|
assert (c);
|
||||||
|
|
||||||
// GC is invoked prior to running any command that displays task IDs, if
|
// GC is invoked prior to running any command that displays task IDs, if
|
||||||
// possible.
|
// possible.
|
||||||
bool auto_commit = false;
|
|
||||||
if (c->displays_id () && !tdb2.read_only ())
|
if (c->displays_id () && !tdb2.read_only ())
|
||||||
{
|
|
||||||
tdb2.gc ();
|
tdb2.gc ();
|
||||||
auto_commit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only read-only commands can be run when TDB2 is read-only.
|
// Only read-only commands can be run when TDB2 is read-only.
|
||||||
// TODO Implement TDB2::read_only
|
// TODO Implement TDB2::read_only
|
||||||
|
@ -410,8 +407,6 @@ int Context::dispatch (std::string &out)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int rc = c->execute (out);
|
int rc = c->execute (out);
|
||||||
if (auto_commit)
|
|
||||||
tdb2.commit ();
|
|
||||||
|
|
||||||
// Write commands cause an update of the shadow file, if configured.
|
// Write commands cause an update of the shadow file, if configured.
|
||||||
if (! c->read_only ())
|
if (! c->read_only ())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue