Git improvements (#24238)
- **Base diffs on uncommitted changes** - **Show added files in project diff view** - **Fix git panel optimism** Release Notes: - Git: update diffs to be relative to HEAD instead of the index; to pave the way for showing which hunks are staged --------- Co-authored-by: Cole <cole@zed.dev>
This commit is contained in:
@@ -290,7 +290,7 @@ impl EditorTestContext {
|
||||
editor.project.as_ref().unwrap().read(cx).fs().as_fake()
|
||||
});
|
||||
let path = self.update_buffer(|buffer, _| buffer.file().unwrap().path().clone());
|
||||
fs.set_index_for_repo(
|
||||
fs.set_head_for_repo(
|
||||
&Self::root_path().join(".git"),
|
||||
&[(path.into(), diff_base.to_string())],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user