Re: [PATCH 4/7] for_each_packed_object: support iterating in pack-order
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Aug 15, 2018, 13:28 UTC
- Message-ID
- <2ac79ea0-dd58-965d-1158-d08a7731e25d@gmail.com>
- In-Reply-To
- <20180810231549.GD19875@sigill.intra.peff.net>
On 8/10/2018 7:15 PM, Jeff King wrote:
Show 12 quoted lines
> 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", packname.buf);
> if (open_pack_index(p))
> die("error opening index for %s", packname.buf);
> - for_each_object_in_pack(p, add_packed_commits, &oids);
> + for_each_object_in_pack(p, add_packed_commits, &oids, 0);
> close_pack(p);
> }This use in write_commit_graph() is actually a good candidate for pack-order, since we are checking each object to see if it is a commit. This is only used when running `git commit-graph write --stdin-packs`, which is how VFS for Git maintains the commit-graph.
I have a note to run performance tests on this case and follow up with a change on top of this series that adds the FOR_EACH_OBJECT_PACK_ORDER flag.
Thanks,
-Stolee