(algorithm: GitHashAlgorithm, byte: u8)
| 1735 | use super::*; |
| 1736 | |
| 1737 | fn oid(algorithm: GitHashAlgorithm, byte: u8) -> GitObjectId { |
| 1738 | let length = match algorithm { |
| 1739 | GitHashAlgorithm::Sha1 => 20, |
| 1740 | GitHashAlgorithm::Sha256 => 32, |
| 1741 | }; |
| 1742 | GitObjectId::new(algorithm, vec![byte; length]).unwrap() |
| 1743 | } |
| 1744 | |
| 1745 | #[test] |
| 1746 | fn repo_path_is_raw_versioned_and_canonical() { |