All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, msysgit@googlegroups.com,
	Tom Preston-Werner <tom@mojombo.com>,
	Jakub Narebski <jnareb@gmail.com>
Subject: Re: Issue 323 in msysgit: Can't clone over http
Date: Sat, 12 Sep 2009 18:01:06 +0800	[thread overview]
Message-ID: <be6fef0d0909120301r79072d5ase0d4b174753af9b5@mail.gmail.com> (raw)
In-Reply-To: <7veiqdzwrk.fsf@alter.siamese.dyndns.org>

Hi,

On Fri, Sep 11, 2009 at 4:54 PM, Junio C Hamano <gitster@pobox.com> wrote:
>  - You fetch, and the walker walks the loose objects, and then finds one
>   object that cannot be obtained as a loose object.  It tries to look up
>   in the *.idx file and finds it in B.
>
>   But the packfile B is long gone.
>
> I didn't follow the codepath that uses http_get_info_packs() and then uses
> repo->packs list to see what it does, but as long as the above does not
> happen we should be Ok.

To determine which pack to get when fetching an object, http-walker.c
does not refer to the *.idx files git already has (that is, those
found locally). Instead, it builds a list of *.idx files (repo->packs
or walker->data->alt->packs) from the remote's objects/info/packs, and
uses that.

So even if the *.idx file for pack B was downloaded from a previous
fetch, it won't be used at all.

Therefore, your concern (over fetching a non-existent pack) won't play
out, unless the server does a repack -a, but forgets to update the
pack list (at objects/info/packs).

PS. The above was solely based on my reading of the code, no testing done.

-- 
Cheers,
Ray Chuan

  reply	other threads:[~2009-09-12 10:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <0016e6470f36315b8a0472bc75a8@google.com>
2009-09-04 10:25 ` Issue 323 in msysgit: Can't clone over http Junio C Hamano
2009-09-04 13:29 ` Tay Ray Chuan
2009-09-07  4:59   ` Junio C Hamano
2009-09-07  5:53     ` Tay Ray Chuan
2009-09-07  7:10       ` Junio C Hamano
2009-09-07  8:18         ` Junio C Hamano
2009-09-07  9:27         ` Tay Ray Chuan
2009-09-07 19:06           ` Junio C Hamano
2009-09-08 12:57             ` Jakub Narebski
2009-09-08 13:18               ` Tay Ray Chuan
2009-09-08 13:10             ` Tay Ray Chuan
2009-09-09 12:33             ` Tay Ray Chuan
2009-09-09 19:08               ` Junio C Hamano
2009-09-11  8:54               ` Junio C Hamano
2009-09-12 10:01                 ` Tay Ray Chuan [this message]
2009-09-12 17:31                   ` Junio C Hamano

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=be6fef0d0909120301r79072d5ase0d4b174753af9b5@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=msysgit@googlegroups.com \
    --cc=tom@mojombo.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.