You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sparse full clone: a stopped merge/cherry-pick/rebase resurrects a file the other side deleted cleanly outside the view #238
Found while reviewing #236 (reproduced on the base commit too, so it predates it). Full clones with a sparse spec only; partial clones are correct because they graft out-of-view paths from the decided root.
Repro (merge, cherry-pick and rebase behave the same): base has src/a.txt and docs/old.txt; the other branch edits src/a.txt and deletes docs/old.txt; ours edits src/a.txt; sparse spec is src/. Resolve the conflict and complete. Without sparse docs/old.txt is gone; with sparse src/ it comes back, silently losing the deletion from history.
Cause: in the completion code (snapshot_files, crates/repo/src/repo.rs ~704-720), parents are still used as a source for paths missing from the decided root; then the out-of-sparse rule (~738-741) copies docs/old.txt back from the tip. The comment at ~648-656 says a path missing from the decided root was decided deleted, but that rule is applied to the picked commit and not to the tip / merge head.
Suggested fix: when a decided root exists, do not use the parents for the out-of-sparse carry (keep them only as the fallback for old state with no decided root). Also amend ADR-0034 refinement 5 (~:185), which says completion carries out-of-view paths only from the decided root. Add tests for merge, pick and rebase with a clean out-of-view deletion, and an out-of-view clean add/modify.
Activity
fix(repo): safe retry and old-view paths for the stopped-op sparse wi…
test(repo): assert the sparse completion temp repo is removed (ref #238)
fix(repo): complete from the decided root alone, pin protected, dir a…
fix(repo): stop resurrecting out-of-view deletions on sparse completi…
feat(repo): sparse follow-ups: partial-clone sidecar check, widen whi…