Subject: Re: Supporting --depth when cloning from a bundle

From: Junio C Hamano <[email-masked]>
Date: Thu, 17 Feb 2022 13:05:55 -0800

Konstantin Ryabitsev <[email-masked]> 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...