Method
build
(
commit: GitObjectId,
tree: GitObjectId,
parents: Vec<GitObjectId>,
derivation: GitDerivation,
)
Source from the content-addressed store, hash-verified
| 247 | } |
| 248 | |
| 249 | fn build( |
| 250 | commit: GitObjectId, |
| 251 | tree: GitObjectId, |
| 252 | parents: Vec<GitObjectId>, |
| 253 | derivation: GitDerivation, |
| 254 | ) -> Result<Self, RepositoryError> { |
| 255 | let origin = Self { |
| 256 | commit, |
| 257 | tree, |
| 258 | parents, |
| 259 | derivation, |
| 260 | }; |
| 261 | origin.validated()?; |
| 262 | Ok(origin) |
| 263 | } |
| 264 | |
| 265 | /// Validate the origin against the hashed classification contract. |
| 266 | /// |