Repository navigation
Back up uncommitted docs before --update edits them; never clear a repo root - #17
Merged
Merged
Conversation
dandydarshan
force-pushed
the
fix/faithful-docs-backup
branch
from
November 7, 2026 01:53
768510b to
2ea2974
Compare
…po root A full-build fallback copied the docs aside only at fallback time, after the update had already deleted and rewritten pages: on this repo the copy was missing 25 of 41 pages. Uncommitted docs are now copied to <docs>.prev-<commit>/ (git-ignored, latest only, without temp/ since the graph is rebuilt from git) when --update starts, before anything writes into docs/; the copy is dropped again when the update succeeds in place. Committed, clean docs still rely on git. Neither path clears or moves a folder that is a repo root (docs written with --output .), which the old move-aside would have done. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXRqeijND7XPq2srGHndRd
dandydarshan
force-pushed
the
fix/faithful-docs-backup
branch
from
November 7, 2026 03:19
2ea2974 to
43ee1c0
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
When
--updatefalls back to a full build, uncommitted docs were copied aside only at fallback time, after the update had already deleted and rewritten pages. On a scratch clone of this repo, that backup was missing 25 of the 35 tracked pages.The copy leaves out
temp/: it's the bulk of the size, and the graph is rebuilt from the docs' commit when missing. The copy stays git-ignored, and only the latest is kept.Evidence
git status.git restore --source=HEAD docs/restores all 41 files.test_uncommitted_docs_are_backed_up_before_the_update_edits_them: a page the update deletes and one it rewrites are both intact in the backup, andtemp/is excluded;test_successful_update_drops_the_backup;test_a_repo_root_is_never_cleared.Merge Danger
Door: two-way
Blast Radius:
--updatewith uncommitted docsEach
--updateon uncommitted docs now copies the pages (withouttemp/) at the start, typically a few MB. The copy is removed when the update succeeds.🤖 Generated with Claude Code
https://claude.ai/code/session_01CXRqeijND7XPq2srGHndRd