Repository navigation
fix: skip .docusaurus and .pnpm-store when comparing a finished worktree's ignored files - #6646
Merged
Merged
Conversation
janicduplessis
marked this pull request as ready for review
November 28, 2026 18:00
This was referenced Nov 29, 2026
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.
Description
A finished worktree stays while one of its git-ignored files is missing from the main checkout or differs there (
ignoredFilesHold), except inside ignored directories named like build output (SKIPPED_WHERE_IGNORED). Docusaurus's generated.docusaurus/folder and a project-local pnpm content store (.pnpm-store/) are not on that list, so a Docusaurus site, or a pnpm project whose store sits inside the checkout, kept its finished worktrees for good. Only the tool writes either folder, and running the tool again recreates it.Solution
Add
.docusaurusand.pnpm-storetoSKIPPED_WHERE_IGNORED, matching.nextand.turbo. The set has three users, and they stay consistent:discovered-removal.ts);savedWorktreeFactsingc/worktrees.ts, which rechecks a saved worktree from saved facts only when its ignored entries are all skipped folders; a worktree with these folders no longer falls back to the full check.As for the other names, a folder is skipped only where git ignores it. Folders that can hold local data or account links (
.wrangler,.vercel,.supabase,.firebase) are left out on purpose. LLP 0004 names the two additions.Still held, and out of scope: files
stim worktree warmcarries, such asAGENTS.override.md, and unrecognised binaries. Either may be someone's own work, so #6643 lists options for the maintainer.Fixes #6643
Test plan
discovered-worktrees.test.ts: the case "skips ignored directories named like build output at any depth" now also writeswebsite/.docusaurus/client-manifest.json. With the name removed from the set it fails withkept: its git-ignored file website/.docusaurus/....ignoredFilesHoldrun against four real finished worktrees of this repository, compared withmain's list: the.pnpm-storeworktree goes from "more than 200 git-ignored files to compare" to no hold. The two.docusaurusworktrees move on to a repository-specific generated file (website/docs/_generated/), so they stay held (see the issue comment). Thestim-fseventsone is unchanged.