From 93cf0729ec7cf3129de0808cbcc3403b86d86fff Mon Sep 17 00:00:00 2001 From: Lukasz Kasprzak Date: Mon, 14 Sep 2026 21:33:39 +0200 Subject: plan 9: an interrupted or failed undo can be finished --- docs/design.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'docs/design.md') diff --git a/docs/design.md b/docs/design.md index 11e859e..caa2a0f 100644 --- a/docs/design.md +++ b/docs/design.md @@ -618,9 +618,19 @@ not logged; declined files are. - `krino log` lists recent runs: id, time, directories, counts. - `krino undo` reverses the most recent run, in every directory it - touched; if that run is itself an undo run, it is refused. An older run - is undone by naming it: `krino undo RUN`. Undo runs cannot themselves be - undone. + touched. An older run is undone by naming it: `krino undo RUN`. Undo runs + cannot themselves be undone: naming one is refused. +- A run is undone as far as it can be. Reversals an earlier undo of the + same run completed are not offered again, so an undo that stopped part + way (a refused or failed step, an interrupt) is finished by undoing the + run once more; when the most recent run is itself an undo, plain + `krino undo` does exactly that for the run it undid. +- A file is identified by its directory and its path within it, so two + directories' files of the same name are reversed apart. A file that one + directory's rules move into another included directory, which sorts it + again in the same run, is two files to undo, reversed in the order the + run touched them; the first may then be refused as missing (known + limitation). - Undo builds a plan like any other, shown and approved the same way (`-y` and `-n` apply). Its per-file prompt has no `t` or `d`. -- cgit v1.3