Add staged status information to diff hunks (#24475)

Release Notes:

- Render unstaged hunks in the project diff editor with a slashed
background

---------

Co-authored-by: maxbrunsfeld <max@zed.dev>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Cole Miller 2025-02-10 21:43:25 -05:00 committed by GitHub
parent a9de9e3cb4
commit 8f75fe25e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 1132 additions and 753 deletions

View file

@ -1246,8 +1246,7 @@ async fn test_remote_git_diffs(cx: &mut TestAppContext, server_cx: &mut TestAppC
diff.read_with(cx, |diff, cx| {
assert_eq!(diff.base_text_string().unwrap(), text_1);
assert_eq!(
diff.unstaged_diff
.as_ref()
diff.secondary_diff()
.unwrap()
.read(cx)
.base_text_string()
@ -1266,8 +1265,7 @@ async fn test_remote_git_diffs(cx: &mut TestAppContext, server_cx: &mut TestAppC
diff.read_with(cx, |diff, cx| {
assert_eq!(diff.base_text_string().unwrap(), text_1);
assert_eq!(
diff.unstaged_diff
.as_ref()
diff.secondary_diff()
.unwrap()
.read(cx)
.base_text_string()
@ -1286,8 +1284,7 @@ async fn test_remote_git_diffs(cx: &mut TestAppContext, server_cx: &mut TestAppC
diff.read_with(cx, |diff, cx| {
assert_eq!(diff.base_text_string().unwrap(), text_2);
assert_eq!(
diff.unstaged_diff
.as_ref()
diff.secondary_diff()
.unwrap()
.read(cx)
.base_text_string()