Skip to content

worktree: Anchor ignore rules at the repository they belong to (#62325) (cherry-pick to preview) - #62484

Merged
zed-zippy[bot] merged 1 commit into
v1.15.xfrom
cherry-pick-v1.15.x-83dc1967
Aug 11, 2026
Merged

worktree: Anchor ignore rules at the repository they belong to (#62325) (cherry-pick to preview)#62484
zed-zippy[bot] merged 1 commit into
v1.15.xfrom
cherry-pick-v1.15.x-83dc1967

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #62325 to preview


Since #60772, a worktree's ignore rules are also applied to the
directories above its root. Because of this, an info/exclude pattern
naming one of those parent directories marks it as ignored, and with it
the whole worktree below.

Stop the walk at the repository containing the worktree root.

Also skip exclude rules for paths outside the work directory they are
anchored at, as .gitignore and global gitignore rules already do.

Release Notes:

  • Fixed a worktree being reported as entirely ignored when its
    repository's info/exclude named one of the worktree's parent
    directories

Since #60772, a worktree's ignore rules are also applied to the
directories above its root. Because of this, an `info/exclude` pattern
naming one of those parent directories marks it as ignored, and with it
the whole worktree below.

Stop the walk at the repository containing the worktree root.

Also skip exclude rules for paths outside the work directory they are
anchored at, as `.gitignore` and global gitignore rules already do.

Release Notes:

- Fixed a worktree being reported as entirely ignored when its
repository's `info/exclude` named one of the worktree's parent
directories
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 11, 2026
@zed-community-bot zed-community-bot Bot added the bot Pull requests authored by a bot label Aug 11, 2026
@zed-zippy
zed-zippy Bot merged commit 352cc1a into v1.15.x Aug 11, 2026
46 checks passed
@zed-zippy
zed-zippy Bot deleted the cherry-pick-v1.15.x-83dc1967 branch August 11, 2026 16:04
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label Aug 12, 2026
@MrSubidubi

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Pull requests authored by a bot cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants