Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-12 Thread Nicolas Pitre
On Tue, 10 Sep 2013, Duy Nguyen wrote: On Mon, Sep 9, 2013 at 10:01 PM, Nicolas Pitre n...@fluxnic.net wrote: However this means that the progress meter will now be wrong and that's terrible ! Users *will* complain that the meter doesn't reach 100% and they'll protest for being denied the

[PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Nguyễn Thái Ngọc Duy
nr_objects in the next patch is used to reflect the number of actual objects in the stream, which may be smaller than the number recorded in pack header. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/index-pack.c | 13 +++-- 1 file changed, 7 insertions(+), 6

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Nicolas Pitre
On Mon, 9 Sep 2013, Nguyễn Thái Ngọc Duy wrote: nr_objects in the next patch is used to reflect the number of actual objects in the stream, which may be smaller than the number recorded in pack header. This highlights an issue that has been nagging me for a while. We decided to send the

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Junio C Hamano
Nicolas Pitre n...@fluxnic.net writes: ... I was wondering if some kind of prefix to the pack stream could be inserted onto the wire when sending a pack v4. Something like: 'T', 'H', 'I', 'N', actual_number_of_sent_objects_in_network_order This 8-byte prefix would simply be

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Nicolas Pitre
On Mon, 9 Sep 2013, Junio C Hamano wrote: Nicolas Pitre n...@fluxnic.net writes: On Mon, 9 Sep 2013, Nguyễn Thái Ngọc Duy wrote: nr_objects in the next patch is used to reflect the number of actual objects in the stream, which may be smaller than the number recorded in pack header.

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Junio C Hamano
Nicolas Pitre n...@fluxnic.net writes: On Mon, 9 Sep 2013, Nguyễn Thái Ngọc Duy wrote: nr_objects in the next patch is used to reflect the number of actual objects in the stream, which may be smaller than the number recorded in pack header. This highlights an issue that has been nagging me

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Nicolas Pitre
On Mon, 9 Sep 2013, Junio C Hamano wrote: Nicolas Pitre n...@fluxnic.net writes: ... I was wondering if some kind of prefix to the pack stream could be inserted onto the wire when sending a pack v4. Something like: 'T', 'H', 'I', 'N',

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Junio C Hamano
Nicolas Pitre n...@fluxnic.net writes: Do we know the actual number of objects to send during the capability negociation? No, and that is not what I meant. We know upfront after capability negotiation (by seeing a request to give them a thin-pack) that we will send, in addition to the usual

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Nicolas Pitre
On Mon, 9 Sep 2013, Junio C Hamano wrote: Nicolas Pitre n...@fluxnic.net writes: Do we know the actual number of objects to send during the capability negociation? No, and that is not what I meant. We know upfront after capability negotiation (by seeing a request to give them a

Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size

2013-09-09 Thread Duy Nguyen
On Mon, Sep 9, 2013 at 10:01 PM, Nicolas Pitre n...@fluxnic.net wrote: However this means that the progress meter will now be wrong and that's terrible ! Users *will* complain that the meter doesn't reach 100% and they'll protest for being denied the remaining objects during the transfer !