zed/crates/worktree
zed-zippy[bot] 6214ca92df
Some checks are pending
run_tests / check_wasm (push) Blocked by required conditions
run_tests / orchestrate (push) Waiting to run
run_tests / check_style (push) Waiting to run
run_tests / clippy_windows (push) Blocked by required conditions
run_tests / clippy_linux (push) Blocked by required conditions
run_tests / clippy_mac (push) Blocked by required conditions
run_tests / clippy_mac_x86_64 (push) Blocked by required conditions
run_tests / run_tests_windows (push) Blocked by required conditions
run_tests / run_tests_linux (push) Blocked by required conditions
run_tests / run_tests_mac (push) Blocked by required conditions
run_tests / miri_scheduler (push) Blocked by required conditions
run_tests / doctests (push) Blocked by required conditions
run_tests / check_workspace_binaries (push) Blocked by required conditions
run_tests / build_visual_tests_binary (push) Blocked by required conditions
run_tests / check_dependencies (push) Blocked by required conditions
run_tests / check_docs (push) Blocked by required conditions
run_tests / check_licenses (push) Blocked by required conditions
run_tests / check_scripts (push) Blocked by required conditions
run_tests / check_postgres_and_protobuf_migrations (push) Blocked by required conditions
run_tests / extension_tests (push) Blocked by required conditions
run_tests / tests_pass (push) Blocked by required conditions
worktree: Apply outer repository excludes within nested repositories (#61492) (cherry-pick to preview) (#61506)
Cherry-pick of #61492 to preview

----
Closes TRA-162

When an entry's ignore stack is rebuilt from scratch (opening a file,
file system events, a search that includes ignored files),
`ignore_stack_for_abs_path` only consulted the `.git/info/exclude` rules
of the nearest ancestor containing `.git`. For a path inside a nested
repository, that nearest ancestor is the nested repository itself, so
the outer repository's exclude rules were silently dropped: entries that
were correctly ignored after the initial scan would flip to unignored
the moment they were loaded or changed on disk, and from then on project
search would surface them.

This is the same class of bug that #60772 fixed for ancestor
`.gitignore` files — this change extends the fix to `info/exclude` by
collecting the exclude rules of every containing repository (outermost
first, mirroring how ancestor gitignores are stacked) instead of just
the innermost one.

Added a regression test that models the affected layout: a bare clone
and a linked worktree of it kept inside the repository, hidden via
anchored patterns in the outer repository's `.git/info/exclude`.

Release Notes:

- Fixed project search returning results from inside nested repositories
that are excluded by the containing repository's `.git/info/exclude`
file.

Co-authored-by: Eric Holk <eric@zed.dev>
2026-07-23 08:12:39 +00:00
..
src worktree: Apply outer repository excludes within nested repositories (#61492) (cherry-pick to preview) (#61506) 2026-07-23 08:12:39 +00:00
tests/integration worktree: Apply outer repository excludes within nested repositories (#61492) (cherry-pick to preview) (#61506) 2026-07-23 08:12:39 +00:00
Cargo.toml Fix the filtering of index.lock + COMMIT_MESSAGE FS events to work in linked worktrees (#57763) 2026-05-27 00:04:30 +00:00
LICENSE-GPL