diff mbox series

doc: bitbake-user-manual-ref-variables: document BB_GIT_SHALLOW_EXTRA_REFS

Message ID 20251105080516.647480-2-m.schwan@phytec.de
State New
Headers show
Series doc: bitbake-user-manual-ref-variables: document BB_GIT_SHALLOW_EXTRA_REFS | expand

Commit Message

Martin Schwan Nov. 5, 2025, 8:05 a.m. UTC
Describe BB_GIT_SHALLOW_EXTRA_REFS which allows keeping additional refs
for shallow clones.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
---
 .../bitbake-user-manual-ref-variables.rst       | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
index 734c7858a..309477071 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-ref-variables.rst
@@ -399,6 +399,23 @@  overview of their function and contents.
 
       For example usage, see :term:`BB_GIT_SHALLOW`.
 
+   :term:`BB_GIT_SHALLOW_EXTRA_REFS`
+      With :term:`BB_GIT_SHALLOW` enabled, by default, all unused refs (branches
+      and tags) are removed from the repository, as shallow processing scales
+      with the number of refs it has to process.
+
+      :term:`BB_GIT_SHALLOW_EXTRA_REFS` allows to explicitly specify additional
+      refs to keep. This is particularly useful for recipes with custom checkout
+      processes, or whose Git-based versioning requires a tag be available (i.e.
+      for ``git describe --tags``). The :term:`BB_GIT_SHALLOW_EXTRA_REFS`
+      variable is a space-separated list of refs, fully specified, and supports
+      wildcards.
+
+      Example usage::
+
+         BB_GIT_SHALLOW_EXTRA_REFS = "refs/tags/v1.0"
+         BB_GIT_SHALLOW_EXTRA_REFS += "refs/heads/*"
+
    :term:`BB_GLOBAL_PYMODULES`
       Specifies the list of Python modules to place in the global namespace.
       It is intended that only the core layer should set this and it is meant