Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-19 Thread Derrick Stolee
On 6/19/2018 10:59 AM, Duy Nguyen wrote: On Tue, Jun 19, 2018 at 2:54 PM Derrick Stolee wrote: On 6/12/2018 11:00 AM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: diff --git a/midx.c b/midx.c index 616af66b13..3e55422a21 100644 --- a/midx.c +++ b/midx.c @@ -1,9

Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-19 Thread Duy Nguyen
On Tue, Jun 19, 2018 at 2:54 PM Derrick Stolee wrote: > > On 6/12/2018 11:00 AM, Duy Nguyen wrote: > > On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: > >> diff --git a/midx.c b/midx.c > >> index 616af66b13..3e55422a21 100644 > >> --- a/midx.c > >> +++ b/midx.c > >> @@ -1,9 +1,62 @@ > >>

Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-19 Thread Derrick Stolee
On 6/12/2018 11:00 AM, Duy Nguyen wrote: On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: diff --git a/midx.c b/midx.c index 616af66b13..3e55422a21 100644 --- a/midx.c +++ b/midx.c @@ -1,9 +1,62 @@ #include "git-compat-util.h" #include "cache.h" #include "dir.h" +#include

Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-12 Thread Duy Nguyen
On Thu, Jun 7, 2018 at 7:01 PM Derrick Stolee wrote: > diff --git a/midx.c b/midx.c > index 616af66b13..3e55422a21 100644 > --- a/midx.c > +++ b/midx.c > @@ -1,9 +1,62 @@ > #include "git-compat-util.h" > #include "cache.h" > #include "dir.h" > +#include "csum-file.h" > +#include "lockfile.h" >

Re: [PATCH 05/23] midx: write header information to lockfile

2018-06-07 Thread Duy Nguyen
On Thu, Jun 7, 2018 at 4:03 PM, Derrick Stolee wrote: > +static char *get_midx_filename(const char *object_dir) > +{ > + struct strbuf midx_name = STRBUF_INIT; > + strbuf_addstr(_name, object_dir); > + strbuf_addstr(_name, "/pack/multi-pack-index"); > + return

[PATCH 05/23] midx: write header information to lockfile

2018-06-07 Thread Derrick Stolee
As we begin writing the multi-pack-index format to disk, start with the basics: the 12-byte header and the 20-byte checksum footer. Start with these basics so we can add the rest of the format in small increments. As we implement the format, we will use a technique to check that our computed