From: Antonin Godard <antonin.godard@bootlin.com>
To: bitbake-devel@lists.openembedded.org
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
docs@lists.yoctoproject.org,
Antonin Godard <antonin.godard@bootlin.com>
Subject: [PATCH] doc/bitbake-user-manual-fetching: add warning on the Git subpath parameter
Date: Thu, 26 Mar 2026 09:54:57 +0100 [thread overview]
Message-ID: <20260326-add-subpath-warning-v1-1-ece919e8779a@bootlin.com> (raw)
[YOCTO #15558]
Add a warning on the subpath option which has an unexpected behavior
with regards to how the HEAD is updated in the checked out repository.
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
doc/bitbake-user-manual/bitbake-user-manual-fetching.rst | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
index 1dcdc0ffee1..5d7d6f7a34d 100644
--- a/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
+++ b/doc/bitbake-user-manual/bitbake-user-manual-fetching.rst
@@ -380,6 +380,21 @@ This fetcher supports the following parameters:
- *"subpath":* Limits the checkout to a specific subpath of the tree.
By default, the whole tree is checked out.
+ .. warning::
+
+ When using this option, the value of :term:`SRCREV` may not be reflected
+ in the checked out repository.
+
+ To achieve a partial checkout of the repository with the ``subpath``
+ option, the BitBake Git fetcher makes use of Git "plumbing" commands: `git
+ read-tree <https://git-scm.com/docs/git-read-tree>`__ and `git
+ checkout-index <https://git-scm.com/docs/git-checkout-index>`__. However,
+ these commands only update the **files** within the repository, and do not
+ update the current ``HEAD`` to point to the commit specified by
+ :term:`SRCREV`. Instead, the value of ``HEAD`` will always point to the
+ tip of the branch specified by the ``branch`` parameter, which may or may
+ not correspond to :term:`SRCREV`.
+
- *"destsuffix":* The name of the path in which to place the checkout.
By default, the path is ``git/``.
---
base-commit: 112bddd8fc684fbdd71139429251b127739f863b
change-id: 20260326-add-subpath-warning-153cf3877495
reply other threads:[~2026-03-26 8:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260326-add-subpath-warning-v1-1-ece919e8779a@bootlin.com \
--to=antonin.godard@bootlin.com \
--cc=bitbake-devel@lists.openembedded.org \
--cc=docs@lists.yoctoproject.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox