Re: Supporting --depth when cloning from a bundle
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 17, 2022, 21:05 UTC
- Message-ID
- <xmqq7d9t8aq4.fsf@gitster.g>
- In-Reply-To
- <20220217141910.oaa6i4lvnotrbecq@meerkat.local>
Konstantin Ryabitsev <konstantin@linuxfoundation.org> writes:
> Sorry for the potentially stupid follow-up question. I know that git makes a > distinction when cloning locally between a direct path and a file:// URL (e.g. > it's only possible to do a shallow clone from a local repository when using > the file:// scheme).
The local optimization uses hardlinks into an existing repository bypassing most of what makes Git Git, and there is no negotiation.
"clone --no-local $PATH" or "clone file://$PATH" runs the "server side" inside $PATH and talks with it, which is ONLY possible because $PATH is a real repository. A bundle file is not a repository, and nobody has written the "server side" to workin inside it, so...