Skip to content

feat(take): re-root a whole offer under a subdirectory - #154

Closed
srnnkls wants to merge 2 commits into
mainfrom
fix/offer-reroot
Closed

srnnkls wants to merge 2 commits into
mainfrom
fix/offer-reroot

Conversation

@srnnkls

@srnnkls srnnkls commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • A subtree rename src of "./" names the whole offer: take = [{ "./" = "apm" }] deploys every offered leaf under apm/. Longest-prefix-wins still lets a more specific subtree or leaf rename win.
  • subtree_prefix in src/projection/take.rs is the one owner of subtree-prefix matching, shared with classify_take_error in src/projection/build.rs.
  • Tests beside the subtree tests in take.rs; README note under Subtree renames, pointing at layout = "by-source" for one directory per binding across a target.

A binding-level dest was prototyped and dropped (fbd6bac): it duplicated take and overlapped by-source + identity, nesting the directory twice when combined.

A subtree rename `src` of `./` names the whole offer, so
`take = [{ "./" = "apm" }]` deploys every offered leaf under `apm/`.
A more specific subtree or leaf rename still wins.

A binding-level `dest = "apm"` is the same re-root without a `take`;
combining it with `take` or `history` is a config error. `phora bind`
and `phora add --to` write it with `--dest`.
`dest` was a second spelling of `take = [{ "./" = dest }]` and overlapped
`layout = "by-source"` with the binding identity; combined, the two nested
the directory twice. The `./` subtree rename stays.
@srnnkls

srnnkls commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

Closing: two targets on one path with different layouts cover this, and sync rejects cross-target overlaps (src/sync/mod.rs:889). henia uses layout = "by-source".

@srnnkls srnnkls closed this Nov 25, 2026
@srnnkls
srnnkls deleted the fix/offer-reroot branch November 25, 2026 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant