Re: 'git clone' doesn't use alternates automatically?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 1, 2009, 01:19 UTC
- Message-ID
- <7v7i4b2bto.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <20090131215514.GB9415@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
> - without either, copy alternates from origin, but _don't_ use > alternates while cloning
Are you talking about a local clone optimization that does hardlink from the source repository?
I am fairly certain that copying alternates from the source repository was not an intended behaviour but was a consequence of lazy coding of how we copy (or link) everything from it. The original was literally the simple matter of:
find objects ! -type d -print | cpio $cpio_quiet_flag -pumd$l "$GIT_DIR/"
whose intention was to copy objects/?? and objects/pack/. and it wasn't even part of the design consideration to worry about what would happen to the alternates the source repository might have in objects/info/.