Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-06 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Jul 5, 2018 at 10:20 AM Derrick Stolee wrote: >> On 6/25/2018 3:38 PM, Junio C Hamano wrote: >> While I don't use substitutions in this patch, I do use them in later >> patches. Here is the final version of this method: >> >> midx_read_expect () { >>

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-05 Thread Eric Sunshine
On Thu, Jul 5, 2018 at 10:20 AM Derrick Stolee wrote: > On 6/25/2018 3:38 PM, Junio C Hamano wrote: > While I don't use substitutions in this patch, I do use them in later > patches. Here is the final version of this method: > > midx_read_expect () { > NUM_PACKS=$1 >

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-07-05 Thread Derrick Stolee
On 6/25/2018 3:38 PM, Junio C Hamano wrote: Derrick Stolee writes: + cat >expect <<- EOF "<<-\EOF", i.e. make it easy for readers to spot that there is no funny substitutions happening in the here-doc body. While I don't use substitutions in this patch, I do use them in later

Re: [PATCH v2 06/24] multi-pack-index: load into memory

2018-06-25 Thread Junio C Hamano
Derrick Stolee writes: > +#define MIDX_HASH_LEN 20 > +#define MIDX_MIN_SIZE (MIDX_HEADER_SIZE + MIDX_HASH_LEN) > > static char *get_midx_filename(const char *object_dir) > { > return xstrfmt("%s/pack/multi-pack-index", object_dir); > } > > +struct multi_pack_index

[PATCH v2 06/24] multi-pack-index: load into memory

2018-06-25 Thread Derrick Stolee
Create a new multi_pack_index struct for loading multi-pack-indexes into memory. Create a test-tool builtin for reading basic information about that multi-pack-index to verify the correct data is written. Signed-off-by: Derrick Stolee --- Makefile| 1 + midx.c