bitbake: bitbake-user-manual: Update documentation for fast BB_GIT_SHALLOW

(Bitbake rev: b92c95fab631156e8c7ecc4ab18e4b16f7e590dc)

Signed-off-by: Stefan Koch <stefan-koch@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Koch 2025-03-03 14:49:10 +01:00 committed by Richard Purdie
parent 65ae50cd16
commit 539b012013

View File

@ -320,11 +320,26 @@ overview of their function and contents.
mirror tarball. If the shallow mirror tarball cannot be fetched, it will
try to fetch the full mirror tarball and use that.
When a mirror tarball is not available, a full git clone will be performed
regardless of whether this variable is set or not. Support for shallow
clones is not currently implemented as git does not directly support
shallow cloning a particular git commit hash (it only supports cloning
from a tag or branch reference).
This setting causes an initial shallow clone instead of an initial full bare clone.
The amount of data transferred during the initial clone will be significantly reduced.
However, every time the source revision (referenced in :term:`SRCREV`)
changes, regardless of whether the cache within the download directory
(defined by :term:`DL_DIR`) has been cleaned up or not,
the data transfer may be significantly higher because entirely
new shallow clones are required for each source revision change.
Over time, numerous shallow clones may cumulatively transfer
the same amount of data as an initial full bare clone.
This is especially the case with very large repositories.
Existing initial full bare clones, created without this setting,
will still be utilized.
If the Git error "Server does not allow request for unadvertised object"
occurs, an initial full bare clone is fetched automatically.
This may happen if the Git server does not allow the request
or if the Git client has issues with this functionality.
See also :term:`BB_GIT_SHALLOW_DEPTH` and
:term:`BB_GENERATE_SHALLOW_TARBALLS`.