From: Alex Bennee Date: Fri, 16 Dec 2011 18:37:14 GMT Subject: Re: Any tips for improving the performance of cloning large repositories? Message-ID: In-Reply-To: <7vzkesigw9.fsf@alter.siamese.dyndns.org> On 16 December 2011 17:08, Junio C Hamano wrote: > Alex Bennee writes: > >> Well that's counter intuitive.... >> >>  - reverting the original repo to one big pack speeds up the clone >>  - adding a --local --reference mirror slows it down > > Neither is. Read what "--local" says in the help text of clone. It > disables the git aware clever optimization. OK that's not how I read the man page: --local, -l When the repository to clone from is on a local machine, this flag bypasses the normal "git aware" transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories. So this says it skips "git aware" (whatever that means) The files under .git/objects/ directory are hardlinked to save space when possible. This is now the default when the source repository is specified with /path/to/repo syntax, so it essentially is a no-op option. To force copying instead of hardlinking (which may be desirable if you are trying to make a back-up of your repository), but still avoid the usual "git aware" transport mechanism, --no-hardlinks can be used. And this says that objects on the local file-system are hardlinked (rather than copied) which I assumed was a optimal approach. --no-hardlinks Optimize the cloning process from a repository on a local filesystem by copying files under .git/objects directory. I'm not sure how this is an optimization? This means more copying rather than linking right? -- Alex, homepage: http://www.bennee.com/~alex/ http://www.half-llama.co.uk