Repository navigation
Description
Summary
Running vcspull sync from inside a dotfiles checkout (such as ~/.dot-config) when ~/.vcspull.yaml symlinks to ~/.dot-config/.vcspull.yaml prompts to trust ~/.dot-config/.vcspull.yaml as an untrusted project configuration and prints every escaping checkout destination (~950 lines) to stderr, scrolling the filename header off-screen before Trust this config? [y/N/always]. resolve_sources() loads ~/.vcspull.yaml in the user scope and then re-discovers the same physical file during the upward project walk without deduplicating resolved paths, while classify_scope() resolves leaf symlinks before checking $HOME and $XDG_CONFIG_HOME/vcspull (and omits $VCSPULL_CONFIGDIR and ~/.vcspull/), misclassifying symlinked user configs as project or external across fmt --all, migrate --all, discover, and add. Separately, _authorize_config() prints every escaping destination uncapped in both interactive TTY prompts and non-TTY VCSPullError messages, and sibling CLI prompts and diagnostics (discover, import --prune-untracked, add, fmt --style concise, migrate, load_configs(), and sync timeout recipes) have no shared preview cap for multi-hundred-repository manifests.
Reproduction
Steps as reported; not re-run.
-
Store a user manifest in
~/.dot-config/.vcspull.yamldeclaring repositories outside~/.dot-config(such as~/study/and~/work/) and symlink~/.vcspull.yamlto~/.dot-config/.vcspull.yaml:$ ln -s ~/.dot-config/.vcspull.yaml ~/.vcspull.yaml -
Change into
~/.dot-config:$ cd ~/.dot-config -
Sync a single repository:
$ vcspull sync libtmux
Expected
resolve_sources()skipsprojectcandidates whose real path is already present in thesystemoruserscope, andclassify_scope()classifies~/.vcspull.{yaml,yml,json},~/.config/vcspull/*,$VCSPULL_CONFIGDIR/*, and~/.vcspull/*(including symlinked files and symlinked config directories) asuserscope rather thanprojectorexternal.- Running
vcspull sync libtmux(orconfig ls,fmt --all,migrate --all,discover,add) inside~/.dot-configloads~/.vcspull.yamlonce as auserconfig without prompting for project trust. - When a genuine
projectconfig does escape its directory on a large manifest,_authorize_config()bounds the escaping-destination preview in both interactive prompts and non-TTY errors so the config path header, total count, and trust prompt orvcspull trustremedy remain visible on screen.
Actual
resolve_sources()emits bothConfigSource("user", ~/.vcspull.yaml, ~)andConfigSource("project", ~/.dot-config/.vcspull.yaml, ~/.dot-config)for the same underlying file._authorize_config()prints! ~/.dot-config/.vcspull.yaml would check repositories out outside its directory:followed by all ~950 repository paths on individual lines tostderrbeforeTrust this config? [y/N/always](and in non-TTY mode joins all ~950 paths onto a singleVCSPullErrorline).
Environment
Versions
vcspull:1.70.1libvcs:0.48.0- Python:
3.14 - OS: Linux
Evidence
Trimmed terminal output
$ vcspull sync libtmux
! ~/.dot-config/.vcspull.yaml would check repositories out outside its directory:
~/study/ai-agents/agent-governance-toolkit
~/study/ai-agents/aider
~/study/ai-agents/atropos
~/study/ai-agents/autonovel
~/study/ai-agents/buzz
~/study/ai-agents/claude-code
~/study/ai-agents/codex
~/study/ai-agents/continue
~/study/ai-agents/copilot-cli
~/study/ai-agents/crush
[... ~935 additional ~/study/* and ~/work/* paths omitted ...]
~/work/learn/learning-rust
~/work/learn/learning-rust-nodejs
~/work/learn/learning-rust-python
Trust this config? [y/N/always]
References
- Unbounded interactive and non-TTY escaping-path output in
src/vcspull/config.py(v1.70.1,8142502) resolve_sources()upwardprojectwalk andclassify_scope()symlink checks insrc/vcspull/_internal/scopes.py(v1.70.1,8142502) andsrc/vcspull/_internal/scopes.py(v1.70.1, lines 378-408)get_config_dir()user config directory precedence insrc/vcspull/util.py(v1.70.1,8142502)- Related: Config writes destroy symlinks at ~/.vcspull.yaml #537, Legacy
shallowfailsmigrateonhg/svn/git://configs #598
Activity