Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-13 Thread Heiko Voigt
On Wed, Oct 12, 2016 at 10:37:33AM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > >> If we do not even have these commits locally, then there is no point > >> attempting to push, so returning 0 (i.e. it is not "needs pushing" > >> situation) is correct but it is a but

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-12 Thread Junio C Hamano
Heiko Voigt writes: >> If we do not even have these commits locally, then there is no point >> attempting to push, so returning 0 (i.e. it is not "needs pushing" >> situation) is correct but it is a but subtle. It's not "we know >> they already have them", but it is "even if

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-12 Thread Heiko Voigt
On Mon, Oct 10, 2016 at 03:56:13PM -0700, Junio C Hamano wrote: > Heiko Voigt writes: > > > -static int submodule_needs_pushing(const char *path, const unsigned char > > sha1[20]) > > +static int check_has_hash(const unsigned char sha1[20], void *data) > > { > > - if

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-10 Thread Junio C Hamano
Heiko Voigt writes: > -static int submodule_needs_pushing(const char *path, const unsigned char > sha1[20]) > +static int check_has_hash(const unsigned char sha1[20], void *data) > { > - if (add_submodule_odb(path) || !lookup_commit_reference(sha1)) > + int *has_hash

Re: [PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-07 Thread Stefan Beller
On Fri, Oct 7, 2016 at 8:06 AM, Heiko Voigt wrote: > We run a command for each sha1 change in a submodule. This is > unnecessary since we can simply batch all sha1's we want to check into > one command. Lets do it so we can speedup the check when many submodule > changes are in

[PATCH v2 3/3] batch check whether submodule needs pushing into one call

2016-10-07 Thread Heiko Voigt
We run a command for each sha1 change in a submodule. This is unnecessary since we can simply batch all sha1's we want to check into one command. Lets do it so we can speedup the check when many submodule changes are in need of checking. Signed-off-by: Heiko Voigt ---