Fix staging and unstaging of added and deleted files (#25631)

* When staging in a buffer whose file has been deleted, do not save the
file
* Fix logic for writing to index when file is deleted

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld
2025-02-26 07:25:31 +00:00
committed by GitHub
parent 33754f8eac
commit ebccef1aa4
6 changed files with 88 additions and 48 deletions
+1
View File
@@ -16510,6 +16510,7 @@ fn assert_hunk_revert(
) {
cx.set_state(not_reverted_text_with_selections);
cx.set_head_text(base_text);
cx.clear_index_text();
cx.executor().run_until_parked();
let actual_hunk_statuses_before = cx.update_editor(|editor, window, cx| {