History

Access pack-indices and pack-offsets of multi-pack indices (#279)

Sebastian Thiel committed 4 years ago

Commit c2a69181 parent 254f61813 files · +79 −54Browse files

Showing the changes to git-commitgraph/src (1 of 13 files). Show all

Unified · Split

git-commitgraph/src/file/access.rs+0−4
@@ -76,10 +76,6 @@ impl File { · 75 unmodified lines
76 let mut upper_bound = self.fan[first_byte];76 let mut upper_bound = self.fan[first_byte];
77 let mut lower_bound = if first_byte != 0 { self.fan[first_byte - 1] } else { 0 };77 let mut lower_bound = if first_byte != 0 { self.fan[first_byte - 1] } else { 0 };
78 78
79 // Bisect using indices
80 // TODO: Performance of V2 could possibly be better if we would be able to do a binary search
81 // on hash-sized chunks directly, but doing so requires transmuting and that is not safe, even though
82 // it should not be if the bytes match up and the type has no destructor.
83 while lower_bound < upper_bound {79 while lower_bound < upper_bound {
84 let mid = (lower_bound + upper_bound) / 2;80 let mid = (lower_bound + upper_bound) / 2;
85 let mid_sha = self.id_at(file::Position(mid));81 let mid_sha = self.id_at(file::Position(mid));