Construct and validate a synthesized Git origin.
(
commit: GitObjectId,
parents: Vec<GitObjectId>,
derivation: GitDerivation,
)
| 80 | impl ChangeOrigin { |
| 81 | /// Construct and validate a synthesized Git origin. |
| 82 | pub fn git_synthesized( |
| 83 | commit: GitObjectId, |
| 84 | parents: Vec<GitObjectId>, |
| 85 | derivation: GitDerivation, |
| 86 | ) -> Result<Self, ChangeValidationError> { |
| 87 | let origin = Self::GitSynthesized { |
| 88 | commit, |
| 89 | parents, |
| 90 | derivation, |
| 91 | }; |
| 92 | origin.validate()?; |
| 93 | Ok(origin) |
| 94 | } |
| 95 | |
| 96 | /// Construct and validate a Git merge-resolution origin. |
| 97 | pub fn git_resolution( |