# git_graph: Exclude non-standard refs \(\#54291\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5f038c2a3a29d785b151a7d9e68feabf221c2c48

Requested commit: 5f038c2a3a29d785b151a7d9e68feabf221c2c48

Commit: 5f038c2a3a29d785b151a7d9e68feabf221c2c48

Tree: 89d0616a94d58718a38402852c3f8d5008ddcc37

Author: Tim Vermeulen

Committer: GitHub

## Message

```
git_graph: Exclude non-standard refs (#54291)

My second take on uncluttering the git graph after #53692, this time by
simply replacing `git log --all` with `git log --ignore-missing
--branches --remotes --tags HEAD`. Thanks @JonGretar for educating me on
this 🙂

This pretty much mirrors which commits VSCode's built-in git graph shows
when selecting "All history item references" (though VSCode has an extra
`git for-each-ref` step):
https://github.com/microsoft/vscode/blob/341ef7db2e1d95f96c9f63c40a518d25bb455188/extensions/git/src/git.ts#L1280-L1344

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Git Graph: Now excludes commits that aren't reachable from branches or
tags.
```

## Parents

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

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