# Make FakeGitRepository behave more like a real git repository \(\#26961\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/74a39c7263a8cbabadcb63a4e9bacaaa78dd4e80)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 74a39c7263a8cbabadcb63a4e9bacaaa78dd4e80

Requested commit: 74a39c7263a8cbabadcb63a4e9bacaaa78dd4e80

Commit: 74a39c7263a8cbabadcb63a4e9bacaaa78dd4e80

Tree: 4ead5076eec00fe95016459e7b58b4d1b0a6a70b

Author: Max Brunsfeld

Committer: GitHub

## Message

```
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>
```

## Parents

- [5f398071b2837857c95126d93474c36705602df5](https://git.cafe/gitcafe/zed/commit/5f398071b2837857c95126d93474c36705602df5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/74a39c7263a8cbabadcb63a4e9bacaaa78dd4e80?format=markdown)
