Git development
 help / color / mirror / Atom feed
From: Brandon Casey <drafnel@gmail.com>
To: Junio C Hamano <gitster@pobox.com>, nico@cam.org
Cc: git@vger.kernel.org
Subject: Re: [PATCH v2 2/2] pack-objects: don't loosen objects available in  alternate or kept packs
Date: Sun, 22 Mar 2009 09:48:15 -0500	[thread overview]
Message-ID: <ee63ef30903220748q4e78e626t2ea3930809a670d6@mail.gmail.com> (raw)
In-Reply-To: <7vbpru9nh9.fsf@gitster.siamese.dyndns.org>

On Sat, Mar 21, 2009 at 11:43 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Brandon Casey <drafnel@gmail.com> 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

  reply	other threads:[~2009-03-22 14:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-21 22:26 [PATCH v2 2/2] pack-objects: don't loosen objects available in alternate or kept packs Brandon Casey
2009-03-22  4:43 ` Junio C Hamano
2009-03-22 14:48   ` Brandon Casey [this message]
2009-03-22 17:40     ` Nicolas Pitre
2009-03-22 19:06   ` Junio C Hamano
2009-03-22 19:23     ` Nicolas Pitre
2009-03-24 23:01     ` Brandon Casey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ee63ef30903220748q4e78e626t2ea3930809a670d6@mail.gmail.com \
    --to=drafnel@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox