Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-16 Thread Christian Couder
On Mon, Aug 13, 2018 at 9:00 PM, Jeff King wrote: > On Mon, Aug 13, 2018 at 05:33:59AM +0200, Christian Couder wrote: > >> >> + memcpy(_core, oid->hash, sizeof(uint64_t)); >> >> + rl->hash += sha_core; >> > >> > Hmm, so the first 64-bits of the oid of each ref that is part of >> > this

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-16 Thread Christian Couder
On Mon, Aug 13, 2018 at 8:11 PM, Jeff King wrote: > On Mon, Aug 13, 2018 at 01:17:18PM +0100, Ramsay Jones wrote: > >> >>> +struct island_bitmap { >> >>> + uint32_t refcount; >> >>> + uint32_t bits[]; >> >> >> >> Use FLEX_ARRAY here? We are slowly moving toward requiring >> >> certain C99

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-13 Thread Jeff King
On Mon, Aug 13, 2018 at 05:33:59AM +0200, Christian Couder wrote: > >> + memcpy(_core, oid->hash, sizeof(uint64_t)); > >> + rl->hash += sha_core; > > > > Hmm, so the first 64-bits of the oid of each ref that is part of > > this island is added together as a 'hash' for the island. And this

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-13 Thread Jeff King
On Mon, Aug 13, 2018 at 01:17:18PM +0100, Ramsay Jones wrote: > >>> +struct island_bitmap { > >>> + uint32_t refcount; > >>> + uint32_t bits[]; > >> > >> Use FLEX_ARRAY here? We are slowly moving toward requiring > >> certain C99 features, but I can't remember a flex array > >>

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-13 Thread Ramsay Jones
On 13/08/18 04:33, Christian Couder wrote: > On Mon, Aug 13, 2018 at 3:14 AM, Ramsay Jones [snip] >> And neither the sha1 or str hash-maps are destroyed here. >> (That is not necessarily a problem, of course! ;-) ) > > The instances are declared as static: > > static khash_sha1

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-12 Thread Christian Couder
On Mon, Aug 13, 2018 at 3:14 AM, Ramsay Jones wrote: > On 12/08/18 06:11, Christian Couder wrote: >> Because the inefficiency primarily arises when an >> object is delitified against another object that does > > s/delitified/deltified/ ? Ok, this will be in the next reroll if any. >> not exist

Re: [PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-12 Thread Ramsay Jones
On 12/08/18 06:11, Christian Couder wrote: > From: Jeff King > > Hosting providers that allow users to "fork" existing > repos want those forks to share as much disk space as > possible. > > Alternates are an existing solution to keep all the > objects from all the forks into a unique

[PATCH v4 1/7] Add delta-islands.{c,h}

2018-08-11 Thread Christian Couder
From: Jeff King Hosting providers that allow users to "fork" existing repos want those forks to share as much disk space as possible. Alternates are an existing solution to keep all the objects from all the forks into a unique central repo, but this can have some drawbacks. Especially when