# Fix stale git statuses \(\#27735\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9f8776d1af2094f97b5c4651a78f18458948664d

Requested commit: 9f8776d1af2094f97b5c4651a78f18458948664d

Commit: 9f8776d1af2094f97b5c4651a78f18458948664d

Tree: e01132b5e983a55c7b252d16440c7c96afa03f09

Author: Cole Miller

Committer: GitHub

## Message

```
Fix stale git statuses (#27735)

Display of git statuses in the git panel, project panel, and tabs
regressed in #27391, causing us to frequently see stale statuses. This
turns out to be because we were not emitting the
`WorktreeUpdatedGitRepositories` event in cases where we should be,
which in turn is because of bumping the `LocalRepositoryEntry`'s
`status_scan_id` too early, so that a later comparison of two
`status_scan_id` values wasn't detecting a change that we're expecting
it to detect.

Release Notes:

- N/A (problematic behavior didn't make it into stable or preview)
```

## Parents

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

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