git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jello huang <ruifeihuang@gmail.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	linux-arm-kernel@lists.infradead.org, git@vger.kernel.org
Subject: Re: cannot fetch arm git tree
Date: Sun, 16 Jan 2011 13:42:48 +0000	[thread overview]
Message-ID: <20110116134248.GD27542@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTinrZ0GnT71GCueUUpAXM5ckq+LBd0RjA51DMR-a@mail.gmail.com>

On Sun, Jan 16, 2011 at 09:10:17PM +0800, Jello huang wrote:
> yes,git doesn't  handle that case and i rename the pack name,but there is
> also the similar error.Now i just delet the git tree and  clone it again
> tonight .

_Always_ without fail fetch Linus' tree before pulling my tree.

My tree is a rsync clone of the objects and pack files in Linus' tree,
plus whatever git decided to build on top of that - for local commits
that's individual object files.  For remote pulls, that's probably a few
small pack files.

There is *no* repacking of my tree.  So the only times it gets 'repacked'
is when Linus repacks his tree.

Let's say you already have a copy of my tree from a month ago, and Linus
has pulled some work from me into his tree, and repacked his tree into one
single pack file.  At the moment, the largest pack file from Linus is
400MB plus a 50MB index.

You already have most of the contents of that 400MB pack file, but if
you're missing even _one_ object which is contained within it, git will
have to download the _entire_ 400MB pack file and index file to retrieve
it.

However, if you first fetch Linus' tree via the git protocol, it can just
request the objects it doesn't have from the git server.  That will mean
you'll have all the objects in the large pack files before you start trying
to pull my tree, and git won't have to download 400MB for the sake of
retrieving just maybe 10k that you didn't have.

This isn't something special with my tree - it's a side effect of the
http protocol git uses.  So, before you fetch _any_ http-based git tree,
first make sure you're up to date with Linus'.

(I update my tree from Linus' in rsync mode to make http-based stuff a
lot more friendly to people using it - some of whom are stuck behind
firewalls which can only do http.  Fetching a constantly repacked git
tree via http results in hundreds of megabytes needing to be fetched
every time.)

So please, whenever possible, always fetch Linus' latest tree _first_
and then mine.  Same goes for any other http based tree which doesn't
auto-repack.

  parent reply	other threads:[~2011-01-16 13:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTikRrewCLGDTU7DjVssjpxz-EFK8AhRScAGPRumg@mail.gmail.com>
     [not found] ` <20110116092315.GA27542@n2100.arm.linux.org.uk>
2011-01-16 11:08   ` cannot fetch arm git tree Uwe Kleine-König
     [not found]     ` <AANLkTinrZ0GnT71GCueUUpAXM5ckq+LBd0RjA51DMR-a@mail.gmail.com>
2011-01-16 13:42       ` Russell King - ARM Linux [this message]
2011-01-17  1:49         ` Jello huang
2011-01-21 13:38         ` Detlef Vollmann
2011-01-21 13:47           ` Uwe Kleine-König
2011-01-21 13:57             ` Russell King - ARM Linux
2011-01-21 14:28               ` Detlef Vollmann
2011-01-21 14:30                 ` Jello huang
2011-01-21 14:50                 ` Russell King - ARM Linux
2011-01-21 15:14                   ` Detlef Vollmann
2011-01-21 15:25                   ` Uwe Kleine-König
2011-01-24  5:01                   ` Miles Bader
2011-01-24  7:21                   ` Johannes Sixt
2011-01-24  7:34                     ` J.H.
2011-01-24 10:53                     ` Russell King - ARM Linux

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20110116134248.GD27542@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=git@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=ruifeihuang@gmail.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).