-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure git diff state management to allow viewing buffers with different diff bases #21258
Merged
Conversation
This file contains 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
Co-authored-by: Richard <[email protected]>
ec68d9e
to
95989f2
Compare
95989f2
to
55796ff
Compare
Co-Authored-By: Cole <[email protected]> Co-Authored-By: Conrad <[email protected]>
* Wait until diff is computed before open_unstaged_changes task resolves * Retain unstaged change sets on behalf of remote collaborators Co-Authored-By: Cole <[email protected]> Co-Authored-By: Conrad <[email protected]>
Co-Authored-By: Cole <[email protected]> Co-Authored-By: Conrad <[email protected]>
000b6e0
to
5f6924a
Compare
maxbrunsfeld
added a commit
that referenced
this pull request
Dec 6, 2024
This fixes an error on nightly, introduced in #21258, where diffs were not shown for buffers that were added to multi-buffers after construction. Release Notes: - N/A
cole-miller
added a commit
that referenced
this pull request
Feb 4, 2025
This PR builds on #21258 to make it possible to use HEAD as a diff base. The buffer store is extended to support holding multiple change sets, and collab gains support for synchronizing the committed text of files when any collaborator requires it. Not implemented in this PR: - Exposing the diff from HEAD to the user - Decorating the diff from HEAD with information about which hunks are staged `test_random_multibuffer` now fails first at `SEED=13277`, similar to the previous high-water mark, but with various bugs in the multibuffer logic now shaken out. Release Notes: - N/A --------- Co-authored-by: Max <[email protected]> Co-authored-by: Ben <[email protected]> Co-authored-by: Max Brunsfeld <[email protected]> Co-authored-by: Conrad Irwin <[email protected]> Co-authored-by: Conrad <[email protected]>
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.
This is a pure refactor of our Git diff state management. Buffers are no longer are associated with one single diff (the unstaged changes). Instead, there is an explicit project API for retrieving a buffer's unstaged changes, and the
Editor
view layer is responsible for choosing what diff to associate with a buffer.The reason for this change is that we'll soon want to add multiple "git diff views" to Zed, one of which will show the uncommitted changes for a buffer. But that view will need to co-exist with other views of the same buffer, which may want to show the unstaged changes.
Todo
random_project_collaboration_tests
Release Notes: