From: Andrew Hamilton <adhamilt@gmail.com>
To: grub-devel@gnu.org
Cc: daniel.kiper@oracle.com, ghetman@gmail.com,
Andrew Hamilton <adhamilt@gmail.com>
Subject: [PATCH 1/1] bootstrap: Ensure shallow GNULIB clone Works on Newer GIT
Date: Sat, 23 Aug 2025 16:22:21 -0500 [thread overview]
Message-ID: <20250823212221.61966-2-adhamilt@gmail.com> (raw)
In-Reply-To: <20250823212221.61966-1-adhamilt@gmail.com>
Update the bootstrap script to be compatible with newer versions
of GIT that changed the git clone -h output from containing:
"--depth"
to:
"--[no-]depth"
Use a regular expression that will support either.
In the future, when GNULIB version is bumped, this bootstrap
change can be replaced by the latest GNULIB bootstrap script
as it appears GNULIB bootstrap now assumes GIT supports the
depth option. This change avoids a full clone on GNULIB, saving
something like 50 MB.
Fixes: https://savannah.gnu.org/bugs/?66357
Signed-off-by: Andrew Hamilton <adhamilt@gmail.com>
---
bootstrap | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/bootstrap b/bootstrap
index dc2238f4a..be8d3582e 100755
--- a/bootstrap
+++ b/bootstrap
@@ -762,11 +762,11 @@ if $use_gnulib; then
shallow=
if test -z "$GNULIB_REVISION"; then
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone -h 2>&1 | grep -E -- '--(\[no-\])?depth' > /dev/null && shallow='--depth 2'
git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \
|| cleanup_gnulib
else
- git fetch -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git fetch -h 2>&1 | grep -E -- '--(\[no-\])?depth' > /dev/null && shallow='--depth 2'
mkdir -p "$gnulib_path"
# Only want a shallow checkout of $GNULIB_REVISION, but git does not
# support cloning by commit hash. So attempt a shallow fetch by commit
--
2.47.2
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
next prev parent reply other threads:[~2025-08-23 21:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-23 21:22 [PATCH 0/1] bootstrap: Reduce GNULIB Size on Newer GIT Andrew Hamilton
2025-08-23 21:22 ` Andrew Hamilton [this message]
2025-08-23 21:44 ` [PATCH 1/1] bootstrap: Ensure shallow GNULIB clone Works " Collin Funk
2025-08-23 22:01 ` Andrew Hamilton
2025-08-23 22:34 ` Collin Funk
2025-08-23 22:37 ` Andrew Hamilton
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=20250823212221.61966-2-adhamilt@gmail.com \
--to=adhamilt@gmail.com \
--cc=daniel.kiper@oracle.com \
--cc=ghetman@gmail.com \
--cc=grub-devel@gnu.org \
/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;
as well as URLs for NNTP newsgroup(s).