On Mon, Jul 08, 2013 at 01:50:41PM -0700, Brandon Casey wrote:
> > +static void sort_revindex(struct revindex_entry *entries, int n, off_t max)
>
> If 'n' is the number of objects in the pack, shouldn't it be unsigned?
Yes. I inherited that bug from the rest of the revindex code.
> The data typ
On Mon, Jul 08, 2013 at 02:35:10PM -0700, Brandon Casey wrote:
> > If 'n' is the number of objects in the pack, shouldn't it be unsigned?
> >
> > The data type for struct packed_git.num_objects is uint32_t. Looks
> > like create_pack_revindex uses the wrong datatype when it captures
> > num_objec
On Mon, Jul 8, 2013 at 1:50 PM, Brandon Casey wrote:
> On Sun, Jul 7, 2013 at 3:14 AM, Jeff King wrote:
>> diff --git a/pack-revindex.c b/pack-revindex.c
>> index 77a0465..d2adf36 100644
>> --- a/pack-revindex.c
>> +++ b/pack-revindex.c
>> @@ -59,11 +59,78 @@ static int cmp_offset(const void *a_
On Sun, Jul 7, 2013 at 3:14 AM, Jeff King wrote:
> The pack revindex stores the offsets of the objects in the
> pack in sorted order, allowing us to easily find the on-disk
> size of each object. To compute it, we populate an array
> with the offsets from the sha1-sorted idx file, and then use
> q
On Mon, Jul 8, 2013 at 12:57 AM, Jeff King wrote:
> On Sun, Jul 07, 2013 at 04:52:23PM -0700, Shawn O. Pearce wrote:
>
>> On Sun, Jul 7, 2013 at 3:14 AM, Jeff King wrote:
>> > The pack revindex stores the offsets of the objects in the
>> > pack in sorted order, allowing us to easily find the on-d
On Sun, Jul 07, 2013 at 04:52:23PM -0700, Shawn O. Pearce wrote:
> On Sun, Jul 7, 2013 at 3:14 AM, Jeff King wrote:
> > The pack revindex stores the offsets of the objects in the
> > pack in sorted order, allowing us to easily find the on-disk
> > size of each object. To compute it, we populate a
On Sun, Jul 7, 2013 at 3:14 AM, Jeff King wrote:
> The pack revindex stores the offsets of the objects in the
> pack in sorted order, allowing us to easily find the on-disk
> size of each object. To compute it, we populate an array
> with the offsets from the sha1-sorted idx file, and then use
> q
The pack revindex stores the offsets of the objects in the
pack in sorted order, allowing us to easily find the on-disk
size of each object. To compute it, we populate an array
with the offsets from the sha1-sorted idx file, and then use
qsort to order it by offsets.
That does O(n log n) offset co
8 matches
Mail list logo