Add redo-reset command#14
Merged
Merged
Conversation
a683fa8 to
d713fa6
Compare
New command that removes all redo build state, allowing a fresh start when the database becomes confused (e.g., source files marked as targets). Removes: - ~/.redo/ (persistent build state: database, stamps) - /tmp/redo-<user>-locks/ (lock files) - /tmp/redo-<user>/ (session temp dirs, caches) Does NOT remove build outputs — only redo's own state. Includes 11 unit tests.
Lists all redo-* commands with one-line descriptions at the bottom of 'redo -h' output for discoverability.
d713fa6 to
0f1753a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
redo-reset— a new command to clear all redo build state when the database becomes confused.Problem
Sometimes redo's database can get confused (e.g., source files marked as targets, or stale state from incomplete builds) if a user performs actions outside of redo's purview. The only fix is
rm -rf ~/.redo, which is hard to discover and easy to forget.Solution
What it removes
~/.redo/— persistent build state (database, stamps)/tmp/redo-<user>-locks/— lock files for parallel builds/tmp/redo-<user>/— session temp dirs and cachesWhat it does NOT remove
Design
redo-ifchange,redo-done, etc.)main()before session initialization — avoids creating state it's about to deleteNothing to reset.)--helpand--versionwork as expectedTests
11 tests in
test/420-reset/all.docovering:--helpshows usage--versionworks