Repository navigation
fix(locallibrary): finish a store or copy whose making was cut off - #441
Merged
Merged
Conversation
Under the lock, open_or_init refused the empty objects/ and snapshots/ and the temp file an interrupted make leaves, so the folder was never a store. offsite::copy refused a destination cut off at the same point. Both now finish what was started and still refuse anything else.
bnb
previously approved these changes
Nov 4, 2026
Rust coverageFrom run 337. Both are held to the thresholds in .cargo/config.toml.
|
bnb
approved these changes
Nov 4, 2026
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.
If making a store was cut off after
objects/andsnapshots/were made but beforestore.jsonwas written, every laterStore::open_or_initrefused the folder as not a locallibrary store. The check it runs under the lock accepted only the files locallibrary keeps beside a store, not what a make leaves behind.store copyhad the same problem with a destination cut off at the same point.Added
Store::left_by_making, which accepts an entry left by a cut-off make:objects/orsnapshots/while they're still empty real directories, or a temp file.objects/orsnapshots/). It checks the store is made exactly when nothing foreign is there, and that opening it again gives the same store.objects/(still refused).Changed
open_or_initaccepts those leftovers and finishes the store. A folder holding anything locallibrary didn't write, including a file insideobjects/orsnapshots/, is still refused. Before the lock it accepts what it did before.offsite::copycarries on into a destination holding only such leftovers instead of refusing it.open_or_initandholds_only_ourssay what each accepts now.Removed
holds_only_ours;left_by_makingcovers it.