# Update git2 to 0.21.0 and add support for SHA-256 object formatted repos \(\#57587\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c3b9cacc0e90276495f372cf6ecc76f49cfbdea6

Requested commit: c3b9cacc0e90276495f372cf6ecc76f49cfbdea6

Commit: c3b9cacc0e90276495f372cf6ecc76f49cfbdea6

Tree: e6adadd19481efe8b4edad6fe4de1a188e48a195

Author: Albert Bogusz

Committer: GitHub

## Message

```
Update git2 to 0.21.0 and add support for SHA-256 object formatted repos (#57587)

Self-Review Checklist:

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

Closes #24070

Upgrades git2 from 0.20.1 to 0.21.0 with the `unstable-sha256` feature -
adds ability to open and work with git repositories using the SHA-256
object format. `Oid::from_str` now detects 64-char hex strings to parse
SHA-256 OIDs correctly.

Also adapts to breaking API changes in 0.21.0:
`Remote::url()` and `Commit::message()` both now return `Result`.

Release Notes:
- Added support for opening SHA-256 object format git repositories
```

## Parents

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

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