git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: git@vger.kernel.org
Subject: git-remote questions: --reference? Plus a git-clone --remote observation.
Date: Sat, 10 May 2008 12:52:36 +0200	[thread overview]
Message-ID: <20080510105235.GA17577@elte.hu> (raw)


git-1.5.4.3-2.fc8.

Today i tried to set up a new tracking repository from scratch and used 
git-remote to populate it. It took a lot of time because it downloaded 
it all from the remote site - but i already had most of those commits 
locally.

I'm using git-clone --reference quite extensively to speed up the 
creation of such new repositories, and i'm wondering whether something 
similar is available/planned for git-remote as well?

Also, i noticed a weirdness about "git-clone --reference" today.

As per the log below, i tried to use a large repository with lots of 
remote tracking branches as a reference for cloning - but there were a 
suprisingly large number of objects to be downloaded - 18K of them.

When i did the same with a linux-2.6.git repository (Linus's upstream 
tree), i only had 1915 commits to fetch.

But Linus's tree is already tracked in the linux.trees.git 
super-repository! I double-checked that both linux-2.6.git and 
linux.trees.git had the exact same head for Linus's tree. So why did 
--reference=super-tree have to download much more than if i used the 
smaller reference tree?

now, i'd expect --reference to just fetch every object locally that it 
can - regardless of the composition of that tree. Apparently it matters 
what the current head is in a repository that is used via --reference?

	Ingo

---------->

$ git-clone --reference=linux.trees.git ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git linux-tmp6
Initialized empty Git repository in /home/mingo/linux-tmp6/.git/
remote: Counting objects: 18014, done.
remote: Compressing objects:  31% (5273/17009)

$ git-clone --reference=linux-2.6.git ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git linux-tmp5
Initialized empty Git repository in /home/mingo/linux-tmp5/.git/
remote: Counting objects: 1915, done.
remote: Compressing objects: 100% (765/765), done.

                 reply	other threads:[~2008-05-10 10:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080510105235.GA17577@elte.hu \
    --to=mingo@elte.hu \
    --cc=git@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).