Make FakeGitRepository behave more like a real git repository (#26961)
This PR reworks the `FakeGitRepository` type that we use for testing git interactions, to make it more realistic. In particular, the `status` method now derives the Git status from the differences between HEAD, the index, and the working copy. This way, if you modify a file in the `FakeFs`, the Git repository's `status` method will reflect that modification. Release Notes: - N/A --------- Co-authored-by: Junkui Zhang <364772080@qq.com>
This commit is contained in:
parent
5f398071b2
commit
74a39c7263
15 changed files with 790 additions and 679 deletions
|
@ -103,7 +103,6 @@ async fn test_project_diff(cx_a: &mut TestAppContext, cx_b: &mut TestAppContext)
|
|||
}),
|
||||
)
|
||||
.await;
|
||||
client_a.fs().recalculate_git_status(Path::new("/a/.git"));
|
||||
cx_b.run_until_parked();
|
||||
|
||||
project_b.update(cx_b, |project, cx| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue