Re: [PATCH v2 2/2] pack-objects: don't loosen objects available in alternate or kept packs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 21, 2009 at 11:43 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Brandon Casey <drafnel@xxxxxxxxx> writes:

> Both patches are whitespace damaged, but I can cope.

I just retrieved one of the patches from gmane and some long lines
were wrapped.  I tried out the gmail imap instructions from
SubmittingPatches for sending these patches.  Those instructions say
that it is possible to send properly formatted patches through gmail,
and seem to instruct to use the web interface for actually sending the
patches.  I wonder if there is some way to instruct gmail to not wrap
long lines? Or whether I did something else wrong?

Previously, I have used gmail's pop interface indirectly through my
phone provider which strips out the "From" field and replaces it with
one that only has my email address and not my name.

>  But I am not sure about one thing...
>
>> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
>> index 6222f19..3f477c5 100644
>> --- a/builtin-pack-objects.c
>> +++ b/builtin-pack-objects.c
>> @@ -1944,6 +1944,29 @@ static void
>> add_objects_in_unpacked_packs(struct rev_info *revs)
>>       free(in_pack.array);
>>  }
>>
>> +static int has_sha1_pack_kept_or_nonlocal(const unsigned char *sha1)
>> +{
>> +     static struct packed_git *last_found = (void *)1;
>> +     struct packed_git *p;
>> +
>> +     p = (last_found == (void *)1) ? packed_git : last_found;
>
> Why (void *)1, not like:
>
>        static struct packed_git *last_found;
>        struct packed_git *p = last_found ? last_found : packed_git;
>
> Am I missing something?

Heh, I am missing something too.  Maybe I should have _thought_ more
about this code that I copied from sha1_file.c: find_pack_entry() and
I would have asked the same question about _that_ code.

Maybe Nico has some idea?

I'll send a new patch, unless Nico has some thoughts.

-brandon
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux