radicle-dev / radicle-git

Everything Radicle growing around Git
Other
35 stars 5 forks source link

commit: verify data #122

Closed FintanH closed 1 year ago

FintanH commented 1 year ago

The Oids passed into Commit::new for parents and tree are never verified to be commits or a tree, respectively.

Upon write of the commit, read the object using the ODB to determine its type. If its the incorrect object then function fails without writing to the ODB.