Re: [PATCH v2 15/16] index-pack: use nr_objects_final as sha1_table size
- From
Nicolas Pitre <nico@fluxnic.net>
- Date
- Sep 12, 2013, 15:34 UTC
- Message-ID
- <alpine.LFD.2.03.1309121132050.20709@syhkavp.arg>
- In-Reply-To
- <CACsJy8D=72RsnNKs-6EdUnhu6kurvQ5S2z5PkV3KcY7SUDHJKg@mail.gmail.com>
On Tue, 10 Sep 2013, Duy Nguyen wrote:
Show 23 quoted lines
> On Mon, Sep 9, 2013 at 10:01 PM, Nicolas Pitre <nico@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 ! > > > > Joking aside, we should think about doing something about it. 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 discarded by index-pack after being > > parsed. > > > > What do you think? > > I have no problem with this. Although I rather we generalize the case > to support multiple packs in the same stream (in some case the server > can just stream away one big existing pack, followed by a smaller pack > of recent updates), where "thin" is just a special pack that is not > saved on disk. So except for the signature difference, it should at > least follow the pack header (sig, version, nr_objects)
Except in this case this is not a separate pack. This prefix is there to provide information that is valid only for the pack to follow and therefore cannot be considered as some independent data.
Nicolas