Skip to content

Commit 5a79dd2

Browse files
committed
Add note about corrected generation dates
Right now we don't handle them at all, which might lead to issues in huge repos.
1 parent 0e8c05c commit 5a79dd2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

crate-status.md

+1
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ The git staging area.
551551

552552
* [x] read-only access
553553
* [x] Graph lookup of commit information to obtain timestamps, generation and parents, and extra edges
554+
* [ ] [Corrected generation dates](https://github.com/git/git/commit/e8b63005c48696a26f976f5f9b0ccaf1983e439d)
554555
* [ ] Bloom filter index
555556
* [ ] Bloom filter data
556557
* [ ] create and update graphs and graph files

gix-commitgraph/src/file/commit.rs

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ impl<'a> Commit<'a> {
5151
root_tree_id: gix_hash::oid::from_bytes_unchecked(&bytes[..file.hash_len]),
5252
parent1: ParentEdge::from_raw(read_u32(&bytes[file.hash_len..][..4])),
5353
parent2: ParentEdge::from_raw(read_u32(&bytes[file.hash_len + 4..][..4])),
54+
// TODO: Add support for corrected commit date offset overflow.
55+
// See https://github.com/git/git/commit/e8b63005c48696a26f976f5f9b0ccaf1983e439d
5456
generation: read_u32(&bytes[file.hash_len + 8..][..4]) >> 2,
5557
commit_timestamp: u64::from_be_bytes(bytes[file.hash_len + 8..][..8].try_into().unwrap())
5658
& 0x0003_ffff_ffff,

0 commit comments

Comments
 (0)