Re: [PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-15 Thread Derrick Stolee
On 2/15/2018 1:19 PM, Junio C Hamano wrote: Derrick Stolee writes: +struct packed_oid_list { + struct object_id **list; + int nr; + int alloc; +}; What is the typical access pattern for this data structure? If it is pretty much "allocate and grow as we

Re: [PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-15 Thread Junio C Hamano
Derrick Stolee writes: > +struct packed_oid_list { > + struct object_id **list; > + int nr; > + int alloc; > +}; What is the typical access pattern for this data structure? If it is pretty much "allocate and grow as we find more", then a dynamic array of struct

Re: [PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-08 Thread Junio C Hamano
Derrick Stolee writes: > +char* get_commit_graph_filename_hash(const char *pack_dir, Asterisk sticks to the identifier, not type, in our codebase. > + struct object_id *hash) > +{ > + size_t len; > + struct strbuf path = STRBUF_INIT; >

[PATCH v3 04/14] commit-graph: implement write_commit_graph()

2018-02-08 Thread Derrick Stolee
Teach Git to write a commit graph file by checking all packed objects to see if they are commits, then store the file in the given pack directory. Signed-off-by: Derrick Stolee --- Makefile | 1 + commit-graph.c | 368