(algorithm: GitHashAlgorithm, oid: Oid)
| 1720 | } |
| 1721 | |
| 1722 | pub(crate) fn git_object_id(algorithm: GitHashAlgorithm, oid: Oid) -> CliResult<GitObjectId> { |
| 1723 | GitObjectId::new(algorithm, oid.as_bytes().to_vec()).map_err(|error| { |
| 1724 | git_error(format!( |
| 1725 | "Git object ID {oid} does not match {algorithm:?}: {error}" |
| 1726 | )) |
| 1727 | }) |
| 1728 | } |
| 1729 | |
| 1730 | /// Tagged Git object ID for a commit SHA string. |
| 1731 | pub(crate) fn git_object_id_for_sha( |
no test coverage detected