diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 21:33:39 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-09-14 21:33:39 +0200 |
| commit | 93cf0729ec7cf3129de0808cbcc3403b86d86fff (patch) | |
| tree | d04bf6825019b68a6e48f4b9e6a5dbdfa0e56c64 /cmd/krino/undo.go | |
| parent | 643eac4a2cba7b34b8a33af1b3dbdc54d9816a53 (diff) | |
| download | krino-93cf0729ec7cf3129de0808cbcc3403b86d86fff.tar.gz krino-93cf0729ec7cf3129de0808cbcc3403b86d86fff.zip | |
plan 9: an interrupted or failed undo can be finished
Diffstat (limited to 'cmd/krino/undo.go')
| -rw-r--r-- | cmd/krino/undo.go | 6 |
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 |
