Skip to content

Commit

Permalink
[BREAKING] remove diff display from 'task undo'
Browse files Browse the repository at this point in the history
TaskChampion does not make the necessary information available to
accomplish this, but see #2928.
  • Loading branch information
djmitche committed Dec 23, 2022
1 parent e525c77 commit 3e6c384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/TDB2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -780,8 +780,7 @@ void TDB2::revert ()
std::string prior;
revert_undo (u, uuid, when, current, prior);

// Display diff and confirm.
show_diff (current, prior, when);
// Confirm.
if (! Context::getContext ().config.getBoolean ("confirmation") ||
confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
{
Expand Down
2 changes: 2 additions & 0 deletions test/undo.t
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ class TestUndoStyle(TestCase):
self.t("add one project:foo priority:H")
self.t("1 modify +tag project:bar priority:")

@unittest.expectedFailure # undo diffs are not supported
def test_undo_side_style(self):
"""Test that 'rc.undo.style:side' generates the right output"""
self.t.config("undo.style", "side")
code, out, err = self.t("undo", input="n\n")
self.assertNotRegex(out, "-tags:\s*\n\+tags:\s+tag")
self.assertRegex(out, "tags\s+tag\s*")

@unittest.expectedFailure # undo diffs are not supported
def test_undo_diff_style(self):
"""Test that 'rc.undo.style:diff' generates the right output"""
self.t.config("undo.style", "diff")
Expand Down

0 comments on commit 3e6c384

Please sign in to comment.