- Fixed bug #634, so that 'undo' obeys the 'confirmation' setting (thanks to
  Steve Rader).
This commit is contained in:
Paul Beckingham
2011-02-12 15:08:57 -05:00
parent afb89f0add
commit a65fe591b8
4 changed files with 8 additions and 4 deletions

View File

@@ -102,6 +102,8 @@
+ Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
+ Fixed bug #628, where dateformats containing spaces were not properly
parsed (thanks to Steve Rader).
+ Fixed bug #634, so that 'undo' obeys the 'confirmation' setting (thanks to
Steve Rader).
+ Fixed bug #641, where certain reports broke when 'dateformat' differed from
'dateformat.report'.
+ Fixed bug #651, which broke the edit command when a task description

View File

@@ -50,7 +50,7 @@ With an ID but no specific command, taskwarrior runs the "info" command.
.TP
.B undo
Reverts the most recent action.
Reverts the most recent action. Obeys the confirmation setting.
.TP
.B shell

View File

@@ -196,8 +196,9 @@ Controls some of the verbosity of taskwarrior.
.TP
.B confirmation=yes
May be "yes" or "no", and determines whether taskwarrior will ask for
confirmation before deleting a task or doing bulk changes. The default value
is "yes".
confirmation before deleting a task, performing bulk changes, or the undo
command. The default value is "yes". Consider leaving this setting as "no",
for safety.
.TP
.B echo.command=yes

View File

@@ -999,7 +999,8 @@ void TDB::undo ()
}
// Output displayed, now confirm.
if (!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
if (context.config.getBoolean ("confirmation") &&
!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
{
std::cout << "No changes made.\n";
context.hooks.trigger ("post-undo");