Repository navigation
fix(config): one config per directory, duplicate keys, shared workspace root - #13
Merged
Merged
Conversation
Reject duplicate project keys with their file and key named. Exercise data directory helpers with explicit paths instead of mutating process environment. [[tasks/harmony-2793]]
Propagate discovery errors and retain the actual parent config for orphan hints. [[tasks/harmony-2793]]
Plugin discovery reads .meta/plugins next to the nearest meta config and next to each parent config that lists it (one workspace), and no further. A legacy .meta config file means no project plugins, without a warning. workspace_root moves to meta_core so worktree scope and plugin scope share one definition; the nearest-config lookup is now nearest_meta_dir. [[tasks/harmony-2793]]
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
…pace workspace_meta_dirs returns the workspace's meta dirs nearest first, mapping a linked git worktree (a set's root checkout) to its main checkout, and asks each parent only for its own project list, so a broken sibling config no longer splits the workspace. Duplicate project keys are checked on MetaConfig itself. [[tasks/harmony-2793]]
…space A hand-made git worktree of the root is a workspace of its own. A set checkout's own meta dir stays first in workspace_meta_dirs, so its local plugins still load. The record file name lives here. [[tasks/harmony-2793]]
Git's shared repository doesn't say which checkout made a set: a hand-made git worktree of the root is a second workspace sharing the root's git dir. set_origin reads the record's project instead. [[tasks/harmony-2793]]
A set checkout's config accepts an absolute worktrees_dir inside the workspace the set was made from. [[tasks/harmony-2793]]
set_source maps <set>/<path> to <project>/<path> from meta's record. workspace_meta_dirs walks the set's own meta dirs, then the source's chain. A set copy's absolute worktrees_dir is checked against the source. [[tasks/harmony-2793]]
A member's alias is looked up by project name in the project's config (or used as the path for recursive sets), and a set made from inside another set leads on to that set's source. [[tasks/harmony-2793]]
Sets lay their repos out as the workspace, so no alias guessing. [[tasks/harmony-2793]]
[[tasks/harmony-2793]]
[[tasks/harmony-2793]]
resolve_inside checks a dangling link as the path it names, so a link the root checkout copies into a set before its target exists leads to that target; a link out is still refused. meta_config_at reads one directory's config. Implements [[tasks/harmony-2793]]
Each link part of the target is followed before a later '..'; '..' out of a missing directory is refused; at most 40 links; the rest of the path is still checked after a followed link; resolver errors escape the path. Implements [[tasks/harmony-2793]]
…s own repo When the source rebuilt from a checkout's place is another git repository, the source is git's main checkout of the checkout's own. Implements [[tasks/harmony-2793]]
…kspace When the place-based source is another repository, the source is the recorded workspace's project that is the checkout's own repository; none means none. Implements [[tasks/harmony-2793]]
… its repo A place that holds no repository (missing, or a plain directory) is looked up by identity too. Implements [[tasks/harmony-2793]]
With no commondir behind a .git file, its target is the common git dir, as repo_git_dir has it. Unit fixtures now write the commondir real linked worktrees have. Implements [[tasks/harmony-2793]]
A record meta can no longer parse still marks a checkout as meta's. Implements [[tasks/harmony-2793]]
…S does canonicalize each existing part, so an absolute target meets the base in its \\?\ form on Windows and links are followed before a later '..'. Implements [[tasks/harmony-2793]]
Implements [[tasks/harmony-2793]]
…n empty gitdir names nothing project_with_git_dir passes over configs it can't read. gitfile_target returns nothing for 'gitdir:' with no target; common_git_dir uses it. has_worktree_record is folded into its one caller. Implements [[tasks/harmony-2793]]
…t just its repository A non-root checkout stands for the recorded workspace's project with the same repository: the one at its place, else the only one; a second workspace's checkout of that repository is no project. Implements [[tasks/harmony-2793]]
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.
META_CONFIG_NAMES.find_meta_config,find_parent_meta_configandfind_root_meta_dirreturnResult, so an unreadable or ambiguous config is an error, not "no config".nearest_meta_dir(a bare.meta/folder like~/.meta/is not a workspace),workspace_meta_dirs(nearest first; each parent counts only if its own project list names the child; a checkout in a set meta made continues with the workspace the set was made from) andworkspace_root, shared by worktree scope and plugin discovery.set_source: the checkout a set checkout stands for (the set's root: the record'sproject; another checkout: that workspace's project with the same repository, normally the one at its place in the set, which mirrors the workspace layout; followed through sets made inside sets;WORKTREE_RECORD_FILEmoved here), so a hand-madegit worktree addof the root is a workspace of its own, and a set copy's absoluteworktrees_diris read as that checkout's.recorded_projectandrecorded_setread meta's worktree record;gitfile_targetnames the git dir a.gitfile points to;meta_config_atreads one directory's config (--configname or the default).resolve_insidefollows a link whose target doesn't exist yet the way the OS would (each existing part resolved as the OS does, so links are followed before a later..and Windows paths meet the base in its\\?\form;..out of a missing directory refused; at most 40 links; the rest of the path still checked), so a link the root checkout copies into a set leads to where its repo goes and a link out is still refused. Its errors escape the path.MetaConfigitself.META_DATA_DIR(the macOS CI flake).Part of the meta stability set: gitkb/meta#128 has the full description and how it was verified. Merge together with it (same branch name, so CI builds them together).
Implements [[tasks/harmony-2793]]