]> Savannah Git Hosting - gnulib.git/commitdiff
bootstrap: Fix recognition of --depth option with recent git releases.
authorBruno Haible <bruno@clisp.org>
Sun, 16 Feb 2025 12:43:40 +0000 (13:43 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 16 Feb 2025 12:45:35 +0000 (13:45 +0100)
Reported by Benno Schulenberg <bensberg@telfort.nl> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-02/msg00106.html>.

* top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Assume that
'git clone' and 'git fetch' support the --depth option.
* build-aux/bootstrap: Regenerated.

ChangeLog
build-aux/bootstrap
top/bootstrap-funclib.sh

index e0df514ecf5ef29525d8a0ae1761ed332c3f3a82..c949a1385d672aa9a5da427120c9054c9d45d0dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2025-02-16  Bruno Haible  <bruno@clisp.org>
+
+       bootstrap: Fix recognition of --depth option with recent git releases.
+       Reported by Benno Schulenberg <bensberg@telfort.nl> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2025-02/msg00106.html>.
+       * top/bootstrap-funclib.sh (prepare_GNULIB_SRCDIR): Assume that
+       'git clone' and 'git fetch' support the --depth option.
+       * build-aux/bootstrap: Regenerated.
+
 2025-02-16  Bruno Haible  <bruno@clisp.org>
 
        toupper_l: Add tests.
index 2d174cedbd7daf2da007d6aacf20af58cc7262c3..fef3cbcd376880a79aeacdfb7889f74c3ea4b442 100755 (executable)
@@ -37,7 +37,7 @@ medir=`dirname "$me"`
 
 # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
 
-scriptlibversion=2025-02-04.01; # UTC
+scriptlibversion=2025-02-16.12; # UTC
 
 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
 #
@@ -580,17 +580,11 @@ prepare_GNULIB_SRCDIR ()
           || cleanup_gnulib
         else
           # GNULIB_REFDIR is not set or not usable. Ignore it.
-          shallow=
+          shallow='--depth 2'
           if test -z "$GNULIB_REVISION"; then
-            if git clone -h 2>&1 | grep -- --depth > /dev/null; then
-              shallow='--depth 2'
-            fi
             git clone $shallow "$gnulib_url" "$gnulib_path" \
               || cleanup_gnulib
           else
-            if git fetch -h 2>&1 | grep -- --depth > /dev/null; then
-              shallow='--depth 2'
-            fi
             # Only want a shallow checkout of $GNULIB_REVISION, but git does not
             # support cloning by commit hash. So attempt a shallow fetch by
             # commit hash to minimize the amount of data downloaded and changes
index 1ad3d85a41fac43c969fd6364ee393893fabd009..47e015bd245fb36e0b840b1e3bb32e18b5325bb5 100644 (file)
@@ -1,6 +1,6 @@
 # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
 
-scriptlibversion=2025-02-04.01; # UTC
+scriptlibversion=2025-02-16.12; # UTC
 
 # Copyright (C) 2003-2025 Free Software Foundation, Inc.
 #
@@ -543,17 +543,11 @@ prepare_GNULIB_SRCDIR ()
           || cleanup_gnulib
         else
           # GNULIB_REFDIR is not set or not usable. Ignore it.
-          shallow=
+          shallow='--depth 2'
           if test -z "$GNULIB_REVISION"; then
-            if git clone -h 2>&1 | grep -- --depth > /dev/null; then
-              shallow='--depth 2'
-            fi
             git clone $shallow "$gnulib_url" "$gnulib_path" \
               || cleanup_gnulib
           else
-            if git fetch -h 2>&1 | grep -- --depth > /dev/null; then
-              shallow='--depth 2'
-            fi
             # Only want a shallow checkout of $GNULIB_REVISION, but git does not
             # support cloning by commit hash. So attempt a shallow fetch by
             # commit hash to minimize the amount of data downloaded and changes