aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/undo.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/krino/undo.go')
-rw-r--r--cmd/krino/undo.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/krino/undo.go b/cmd/krino/undo.go
index b7a139f..c942ae1 100644
--- a/cmd/krino/undo.go
+++ b/cmd/krino/undo.go
@@ -97,6 +97,12 @@ func cmdUndo(g *globals, args []string, stdout, stderr io.Writer) int {
return 0
}
runID = runs[0].ID
+ // The most recent run is itself an undo: continue it, by planning the
+ // run it undid again - reversals it completed are not offered twice
+ // (review M10). Naming an undo run explicitly is still refused.
+ if runs[0].UndoOf != "" {
+ runID = runs[0].UndoOf
+ }
}
// PlanUndo only reads the log; nothing is touched yet (spec ยง10), which