Skip to content

git_store: Coalesce refresh pathspecs - #56406

Merged
cole-miller merged 1 commit into
zed-industries:mainfrom
hferreiro:git-coalesce
Jun 1, 2026
Merged

git_store: Coalesce refresh pathspecs#56406
cole-miller merged 1 commit into
zed-industries:mainfrom
hferreiro:git-coalesce

Conversation

@hferreiro

Copy link
Copy Markdown
Contributor

Coalesce repo-relative paths before refreshing git status and diff state. The worktree scanner can report both a directory and its descendants in the same repository bucket, which makes git receive redundant pathspecs.

This keeps refresh commands smaller for large repositories such as Chromium, reducing git pathspec matching work and improving status refresh performance during large worktree updates, as the initial repo scan.

Partially fixes #43861

Release Notes:

  • Reduced git CPU usage on large repos

Coalesce repo-relative paths before refreshing git status and diff
state. The worktree scanner can report both a directory and its
descendants in the same repository bucket, which makes git receive
redundant pathspecs.

This keeps refresh commands smaller for large repositories such as
Chromium, reducing git pathspec matching work and improving status
refresh performance during large worktree updates.

Partially fixes zed-industries#43861

Release notes:

- Reduce git CPU usage on large repos
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 11, 2026
@ChristopherBiscardi ChristopherBiscardi added the area:integrations/git Git integration feedback label May 11, 2026
@maxdeviant
maxdeviant requested a review from cole-miller May 18, 2026 23:31

@cole-miller cole-miller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cole-miller
cole-miller added this pull request to the merge queue Jun 1, 2026
Merged via the queue into zed-industries:main with commit bc823db Jun 1, 2026
44 checks passed
@hferreiro
hferreiro deleted the git-coalesce branch June 1, 2026 12:33
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
Coalesce repo-relative paths before refreshing git status and diff
state. The worktree scanner can report both a directory and its
descendants in the same repository bucket, which makes git receive
redundant pathspecs.

This keeps refresh commands smaller for large repositories such as
Chromium, reducing git pathspec matching work and improving status
refresh performance during large worktree updates, as the initial repo
scan.

Partially fixes zed-industries#43861

Release Notes:

- Reduced git CPU usage on large repos
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
Coalesce repo-relative paths before refreshing git status and diff
state. The worktree scanner can report both a directory and its
descendants in the same repository bucket, which makes git receive
redundant pathspecs.

This keeps refresh commands smaller for large repositories such as
Chromium, reducing git pathspec matching work and improving status
refresh performance during large worktree updates, as the initial repo
scan.

Partially fixes zed-industries#43861

Release Notes:

- Reduced git CPU usage on large repos
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Coalesce repo-relative paths before refreshing git status and diff
state. The worktree scanner can report both a directory and its
descendants in the same repository bucket, which makes git receive
redundant pathspecs.

This keeps refresh commands smaller for large repositories such as
Chromium, reducing git pathspec matching work and improving status
refresh performance during large worktree updates, as the initial repo
scan.

Partially fixes zed-industries#43861

Release Notes:

- Reduced git CPU usage on large repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:integrations/git Git integration feedback cla-signed The user has signed the Contributor License Agreement

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Git consume too much CPU resources for no reason

3 participants