Re: [PATCH 4/7] for_each_packed_object: support iterating in pack-order

2018-08-16 Thread Jeff King
On Wed, Aug 15, 2018 at 09:28:44AM -0400, Derrick Stolee wrote: > On 8/10/2018 7:15 PM, Jeff King wrote: > > diff --git a/commit-graph.c b/commit-graph.c > > index b0a55ad128..69a0d1c203 100644 > > --- a/commit-graph.c > > +++ b/commit-graph.c > > @@ -730,7 +730,7 @@ void write_commit_graph(const

Re: [PATCH 4/7] for_each_packed_object: support iterating in pack-order

2018-08-15 Thread Derrick Stolee
On 8/10/2018 7:15 PM, Jeff King wrote: diff --git a/commit-graph.c b/commit-graph.c index b0a55ad128..69a0d1c203 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -730,7 +730,7 @@ void write_commit_graph(const char *obj_dir, die("error adding pack %s",

[PATCH 4/7] for_each_packed_object: support iterating in pack-order

2018-08-10 Thread Jeff King
We currently iterate over objects within a pack in .idx order, which uses the object hashes. That means that it is effectively random with respect to the location of the object within the pack. If you're going to access the actual object data, there are two reasons to move linearly through the