History

adapt to changes in git-hash (#279)

Sebastian Thiel committed 4 years ago

Commit 5eb02301 parent 79dc0d54 files · +6 −7Browse files

Showing the changes to git-commitgraph/src/file/commit.rs (1 of 4 files). Show all

Unified · Split

git-commitgraph/src/file/commit.rs+1−1
@@ -43,7 +43,7 @@ impl<'a> Commit<'a> { · 42 unmodified lines
43 Commit {43 Commit {
44 file,44 file,
45 pos,45 pos,
46 root_tree_id: git_hash::oid::try_from(&bytes[..file.hash_len]).expect("hash bytes to be alright"),46 root_tree_id: git_hash::oid::from_bytes_unchecked(&bytes[..file.hash_len]),
47 parent1: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len..][..4])),47 parent1: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len..][..4])),
48 parent2: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len + 4..][..4])),48 parent2: ParentEdge::from_raw(BigEndian::read_u32(&bytes[file.hash_len + 4..][..4])),
49 generation: BigEndian::read_u32(&bytes[file.hash_len + 8..][..4]) >> 2,49 generation: BigEndian::read_u32(&bytes[file.hash_len + 8..][..4]) >> 2,