Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ clone: the view closure is filled by id before switch, fast-forward, undo and
`sparse disable` stay refused. Design and open questions in
[ADR-0048](docs/adr/0048-presence-based-partial-clones.md).

**P37c — merge on partial clones (proposed).** A tree-recursive three-way merge
**P37c — merge on partial clones (proposed; 37c-i engine built, not yet wired).** A tree-recursive three-way merge
that carries a subtree by id where the three sides agree, checks protection
rules before carrying, never drops wraps for subtrees it does not enumerate,
and fills (lazy) or refuses (otherwise) the region where the sides differ,
Expand Down
6 changes: 6 additions & 0 deletions crates/repo/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ pub enum Error {
/// full clone (or a full backfill of every prefix), not one path.
#[error("{0} is not supported on a partial clone; run `sc backfill --all` to convert to a full clone first")]
PartialCloneUnsupported(String),
/// A merge result would make `{0}` both a file and a directory (one side
/// has a file where the other has a directory, or a file where the merged
/// result needs a directory). Detected before any output is written
/// (ADR-0049).
#[error("merge would make {0} both a file and a directory; resolve the collision on one branch first")]
PathCollision(String),
#[error("already up to date")]
UpToDate,
/// The named branch is private and the caller either provided no identity
Expand Down
4 changes: 4 additions & 0 deletions crates/repo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ pub mod ignore;
pub mod layout;
pub mod lock;
pub mod merge;
// Wired into `merge` on partial clones in P37c-ii (ADR-0049); until then only
// its differential tests call it.
pub mod merge_state;
#[cfg_attr(not(test), allow(dead_code))]
pub(crate) mod merge_tree;
pub mod oplog;
#[cfg(test)]
mod partial_walks;
Expand Down
569 changes: 378 additions & 191 deletions crates/repo/src/merge.rs

Large diffs are not rendered by default.

Loading
Loading