Re: [PATCH v5] fetch-pack.c: use oidset to check existence of loose object

2018-03-13 Thread Junio C Hamano
Takuto Ikuta writes: > +struct loose_object_iter { > + struct oidset *loose_object_set; > + struct ref *refs; > +}; > + > +/* > + * If the number of refs is not larger than the number of loose objects, > + * this function stops inserting and returns false. > + */ > +static int add_loose

[PATCH v5] fetch-pack.c: use oidset to check existence of loose object

2018-03-10 Thread Takuto Ikuta
In repository having large number of remote refs, because to check existence of each refs in local repository to packed and loose objects, 'git fetch' ends up doing a lot of lstat(2) to non-existing loose form, which makes it slow. Instead of making as many lstat(2) calls as the refs the remote si