| 467 | } |
| 468 | |
| 469 | fn parents_from(git: &GitRepository, head: &git2::Oid) -> CliResult<Vec<GitOid>> { |
| 470 | let commit = git |
| 471 | .find_commit(*head) |
| 472 | .map_err(|error| git_map(error.to_string()))?; |
| 473 | let mut parents = Vec::new(); |
| 474 | for parent in commit.parent_ids() { |
| 475 | let parent: git2::Oid = parent; |
| 476 | parents.push(GitOid::from_hex(&parent.to_string()).map_err(git_map)?); |
| 477 | } |
| 478 | Ok(parents) |
| 479 | } |
| 480 | |
| 481 | /// The binding payload's reviewed loss facts (review CB-9C R7): the view's |
| 482 | /// explicit EmptyDirectory projection losses, mapped to the binding codec's |