{"thread":{"id":"13460","subject":"git-remote questions: --reference? Plus a git-clone --remote observation.","startedAt":"2008-05-10T10:52:36Z","lastAt":"2008-05-10T10:52:36Z","messageCount":1,"participants":["Ingo Molnar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"76504","messageId":"20080510105235.GA17577@elte.hu","threadId":"13460","inReplyTo":null,"subject":"git-remote questions: --reference? Plus a git-clone --remote observation.","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2008-05-10T10:52:36Z","receivedAt":"2008-05-10T10:52:36Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\ngit-1.5.4.3-2.fc8.\n\nToday i tried to set up a new tracking repository from scratch and used \ngit-remote to populate it. It took a lot of time because it downloaded \nit all from the remote site - but i already had most of those commits \nlocally.\n\nI'm using git-clone --reference quite extensively to speed up the \ncreation of such new repositories, and i'm wondering whether something \nsimilar is available/planned for git-remote as well?\n\nAlso, i noticed a weirdness about \"git-clone --reference\" today.\n\nAs per the log below, i tried to use a large repository with lots of \nremote tracking branches as a reference for cloning - but there were a \nsuprisingly large number of objects to be downloaded - 18K of them.\n\nWhen i did the same with a linux-2.6.git repository (Linus's upstream \ntree), i only had 1915 commits to fetch.\n\nBut Linus's tree is already tracked in the linux.trees.git \nsuper-repository! I double-checked that both linux-2.6.git and \nlinux.trees.git had the exact same head for Linus's tree. So why did \n--reference=super-tree have to download much more than if i used the \nsmaller reference tree?\n\nnow, i'd expect --reference to just fetch every object locally that it \ncan - regardless of the composition of that tree. Apparently it matters \nwhat the current head is in a repository that is used via --reference?\n\n\tIngo\n\n---------->\n\n$ git-clone --reference=linux.trees.git ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git linux-tmp6\nInitialized empty Git repository in /home/mingo/linux-tmp6/.git/\nremote: Counting objects: 18014, done.\nremote: Compressing objects:  31% (5273/17009)\n\n$ git-clone --reference=linux-2.6.git ssh://master.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86.git linux-tmp5\nInitialized empty Git repository in /home/mingo/linux-tmp5/.git/\nremote: Counting objects: 1915, done.\nremote: Compressing objects: 100% (765/765), done.\n"}]}