Skip to content

git: Move git-blame outside of git job queue#43565

Merged
kubkon merged 2 commits intomainfrom
git/move-git-blame-out-of-job-queue
Nov 27, 2025
Merged

git: Move git-blame outside of git job queue#43565
kubkon merged 2 commits intomainfrom
git/move-git-blame-out-of-job-queue

Conversation

@kubkon
Copy link
Member

@kubkon kubkon commented Nov 26, 2025

We restructured struct Repository a bit so that it now stores a shared task of enum RepositoryState. This way, we can now re-use it outside of the git job queue when spawning a git job a standalone bg task. An example here would be git-blame that does not require any file locks and is not susceptible to git job ordering.

As a result of this change, loading (and modifying) a file that contains a huge git history will no longer block other git operations on the repo such as staging/unstaging/committing.

Release Notes:

  • Improved overall git experience when loading buffers with massive git history where they would block other git jobs from running (such as staging/unstaging/commiting). Now, git-blame will run separately from the git job queue on the side and the buffer with blame hints when finished thus unblocking other git operations.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Nov 26, 2025
@kubkon kubkon enabled auto-merge (squash) November 26, 2025 15:47
We restructured `struct Repository` a bit so that it now stores
a shared task of `enum RepositoryState`. This way, we can now re-use it
outside of the git job queue when spawning a git job a standalone bg task.
An example here would be `git-blame` that does not require any file locks
and is not susceptible to git job ordering.

As a result of this change, loading (and modifying) a file that contains
a huge git history will no longer block other git operations on the repo
such as staging/unstaging/committing.

Co-authored-by: Cole Miller <cole@zed.dev>
@kubkon kubkon merged commit 05b999b into main Nov 27, 2025
23 checks passed
@kubkon kubkon deleted the git/move-git-blame-out-of-job-queue branch November 27, 2025 21:07
11happy pushed a commit to 11happy/zed that referenced this pull request Dec 1, 2025
We restructured `struct Repository` a bit so that it now stores a shared
task of `enum RepositoryState`. This way, we can now re-use it outside
of the git job queue when spawning a git job a standalone bg task. An
example here would be `git-blame` that does not require any file locks
and is not susceptible to git job ordering.

As a result of this change, loading (and modifying) a file that contains
a huge git history will no longer block other git operations on the repo
such as staging/unstaging/committing.

Release Notes:

- Improved overall git experience when loading buffers with massive git
history where they would block other git jobs from running (such as
staging/unstaging/commiting). Now, git-blame will run separately from
the git job queue on the side and the buffer with blame hints when
finished thus unblocking other git operations.

Co-authored-by: Cole Miller <cole@zed.dev>
@katie-z-geer katie-z-geer moved this from Community PRs to Small feature requests in Quality Week – December 2025 Dec 2, 2025
@katie-z-geer katie-z-geer moved this from Small feature requests to Done in Quality Week – December 2025 Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

Development

Successfully merging this pull request may close these issues.

1 participant