Skip to content

Delphi: name workspaces by their place in the tree; links: becomes workspaces: - #39

Merged
bracyw merged 1 commit into
mainfrom
delphi-path-names
Oct 11, 2026
Merged

bracyw merged 1 commit into
mainfrom
delphi-path-names

Conversation

@bracyw

@bracyw bracyw commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

Stacked on #37: merge that first, then retarget this PR to main (GitHub does it on its own if #37's branch is deleted).

Names

  • A workspace's name is its folder's path minus workspaces/, and its branch is ws/ plus that name:

    Folder on main Branch
    software/application-software/argos/workspaces/argos-dev ws/software/application-software/argos/argos-dev
    software/application-software/argos/workspaces/experimental ws/software/application-software/argos/experimental
    software/application-software/nero/workspaces/nero-experimental ws/software/application-software/nero/nero-experimental
  • name: in workspace.yml holds that full name. Workspaces in different places may now end in the same last part.

  • check.sh rejects a name that is a folder of another's, because git can't hold both ws/a and ws/a/b. Example: a workspace argos at the application-software level, beside the Argos project.

  • switch.sh takes the full name, the branch, or the last part alone when only one workspace ends in it (switch.sh nero-experimental).

links: becomes workspaces:

  • Entries are branch names, - ws/<name> or - main. They land at linked/<branch>.
  • check.sh verifies each listed workspace exists on main.

Moving over

  • sync starts each new ws/<name> from its old ws/<leaf> branch, so history and unproposed edits carry over. The old branches stay, with a notice.
  • The rehearsal on a mirror of the real repo created all 3 new branches. It also carried over and proposed an unproposed edit sitting on ws/argos-dev: Jeffrey's create-ticket change.
  • For people, this is one manual step. Their old branch stops updating, so it can't deliver the migration:
    git fetch && git switch ws/software/application-software/argos/argos-dev && bash .delphi/setup.sh
    
  • The hook treats the old and new names as one workspace, so this switch moves nothing.
  • Migration 0.1.0 then renames what the clone keeps under old names: parked slots (including the pre-Workspaces: switch to change workspace; declare links in workspace.yml #34 .git/delphi/), old copies in linked/, and version records. That let park.sh drop its .git/delphi fallback.

After merge (needs a repo admin)

  • Check that branch protection covers ws/**. Nested names need **, not *.
  • Delete the old ws/argos-dev, ws/experimental and ws/nero-experimental once everyone has moved.

Tests

  • e2e: 80 checks, shellcheck clean.
  • Rehearsed on a mirror of the real repo under bash 3.2: sync, then a clone moving onto its new branch with a parked workspace, migrating, and switching by last part both ways. Worktrees came back, and git status was clean.

…rkspaces: (0.1.0)

A workspace's name is its folder's path without workspaces/
(software/application-software/argos/argos-dev), so its branch is ws/<that>; names may share a last
part, and check.sh rejects one that is a folder of another's (git can't hold both ws/a and ws/a/b).
workspace.yml's links: is workspaces:, listing branches (- ws/<name> or - main), copied to
linked/<branch> and checked to exist. sync starts a missing ws/<name> from the old ws/<leaf>, so
history and unproposed edits carry over, and notes the old branch. park.sh treats the old and new
names as one workspace and drops the .git/delphi fallback; switch.sh takes a name, a branch, or a
unique last part. Migration 0.1.0 renames parked slots, old copies in linked/ and version records.
@bracyw
bracyw changed the base branch from delphi-versioned-migrations to main October 11, 2026 15:55
@bracyw
bracyw merged commit 4c67efe into main Oct 11, 2026
@bracyw
bracyw deleted the delphi-path-names branch October 11, 2026 22:50
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