git: Move git-blame outside of git job queue#43565
Merged
Conversation
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>
bb2e5cc to
b185ad9
Compare
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>
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.
We restructured
struct Repositorya bit so that it now stores a shared task ofenum 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 begit-blamethat 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: