Re: Priming git clone with a local repo?

2013-07-11 Thread Junio C Hamano
Andreas Krey  writes:

> I'm wondering if there is (or will be) a way of doing almost
>
>   git clone --reference localrepo host:canonrep
>
> Basically, I don't want the implications of --reference but still the
> performance advantages of reusing local objects/pack files.

I think the standard operating procedure for that is to still clone
with the "--reference" option first, and then do "repack -a -d" in
the resulting clone (note the lack of "-l" option in "repack").

After that repack, you should be able to discard the alternates
file.

$ git clone --reference ../there otherhost:repo ours.git
$ cd ours.git
$ git repack -a -d ;# no "-l"!!!
$ mv .git/objects/info/alternates .git/objects/info/alter-nates
$ git fsck
$ rm .git/objects/info/alter-nates
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Priming git clone with a local repo?

2013-07-11 Thread Andreas Krey
Hi, dear listers,

I'm wondering if there is (or will be) a way of doing almost

  git clone --reference localrepo host:canonrep

Basically, I don't want the implications of --reference but still the
performance advantages of reusing local objects/pack files. I probably
have to go and first do a

  git clone -s -n localrepo canonrepo

and then go into canonrepo, fix up the remote, fetch, and properly
reset the local branch. Is there an easier way of doing a
--reference-but-hardlink-objects-instead-of-setting-alternate
within git? Or implementing it?

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds 
Date: Fri, 22 Jan 2010 07:29:21 -0800
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html