You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before this change, EntryMode wrapped a `u16` which didn't store enough
information to match the git representation as a `&[u8]` of len 5 or 6.
In particular, the mode that represents a `Tree` could be represented as
`"40000"` or `"040000"`, and the difference would get lost once it was
represented as `0o40000`.
We now have two ways to represent the `EntryMode`:
* `EntryMode` is backed by an owned `BString`.
* `EntryModeRef` is backed by a `&bstr` and bound to the lifetime of the
owner of these bytes.
This allows call-sites to pick a trade-off between convenience
(`EntryMode` allows to not worry about lifetimes) vs performance
(`EntryModeRef` doesn't allocate) and fits the general paradigm used in
the wider gitoxide project.
Fixes [issue 1887](#1887)
0 commit comments