radicle-dev / radicle-link

The second iteration of the Radicle code collaboration protocol.
Other
421 stars 39 forks source link

Review types exposed by ReadOnly #710

Open FintanH opened 3 years ago

FintanH commented 3 years ago

The ReadOnlyStorage trait exposes some git2 types which allow mutation to the store. For example, a &mut reference to a git2::Reference will allow the caller to delete that reference.

It's not really possible to completely stop someone from doing this since they can always drop down through the git2 API (or any other for that matter), however, if we provide types that prohibit these actions then we can encourage someone from not doing something like that :)