view build-aux/gnulib-bootstrap-git-fetch.diff @ 33469:321f49a98a85

Re-instate patch to fetch from upstream gnulib repository if needed. * build-aux/gnulib-bootstrap-git-fetch.diff: Re-instate patch that was deleted in c51b07a71421 and update it for the latest version of gnulib. * bootstrap-funclib.sh: Apply that patch to local copy of script. * bootstrap.conf: Revert change from c51b07a71421.
author Markus Mützel <markus.muetzel@gmx.de>
date Fri, 26 Apr 2024 20:05:21 +0200
parents
children
line wrap: on
line source

Update bootstrap script from upstream gnulib to automatically fetch from repository if needed

See also: https://lists.gnu.org/archive/html/bug-gnulib/2020-08/msg00150.html

diff -r c51b07a71421 bootstrap-funclib.sh
--- a/bootstrap-funclib.sh	Fri Apr 26 13:33:37 2024 -0400
+++ b/bootstrap-funclib.sh	Fri Apr 26 20:00:21 2024 +0200
@@ -532,6 +532,10 @@
         # The subdirectory 'gnulib' already exists.
         if test -n "$GNULIB_REVISION"; then
           if test -d "$gnulib_path/.git"; then
+            if ! git --git-dir="$gnulib_path"/.git cat-file \
+                 commit "$GNULIB_REVISION"; then
+              git --git-dir="$gnulib_path"/.git fetch
+            fi
             (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") || exit 1
           else
             die "Error: GNULIB_REVISION is specified in bootstrap.conf," \