view build-aux/gnulib-bootstrap-git-fetch.diff @ 31626:9034cf663768

eliminate unnecessary base_qobject object from GUI dialog classes * dialog.h, dialog.cc (QUIWidgetCreator::m_octave_qobj): Delete unnecessary data member. (QUIWidgetCreator::QUIWidgetCreator, MessageDialog::MessageDialog, ListDialog::ListDialog, InputDialog::InputDialog, FileDialog::FileDialog): Eliminate base_qobject argument. Change all uses.
author John W. Eaton <jwe@octave.org>
date Sat, 03 Dec 2022 01:00:04 -0500
parents e98fb9b4be86
children e6d339b9309d
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 -urN a/bootstrap-funclib.sh b/bootstrap-funclib.sh
--- a/bootstrap-funclib.sh.	2022-11-12 13:47:39.921059000 +0100
+++ b/bootstrap-funclib.sh	2022-11-12 13:55:04.393284235 +0100
@@ -532,6 +532,11 @@
         fi
 
         trap - 1 2 13 15
+
+      elif test -n "$GNULIB_REVISION" \
+           && ! git --git-dir="$gnulib_path"/.git cat-file \
+                commit "$GNULIB_REVISION"; then
+        git --git-dir="$gnulib_path"/.git fetch
       fi
     fi
     GNULIB_SRCDIR=$gnulib_path
@@ -543,6 +548,10 @@
   # XXX Should this be done if $use_git is false?
   if test -d "$GNULIB_SRCDIR"/.git && test -n "$GNULIB_REVISION" \
      && ! git_modules_config submodule.gnulib.url >/dev/null; then
+    if ! git --git-dir="$GNULIB_SRCDIR"/.git cat-file \
+         commit "$GNULIB_REVISION"; then
+      git --git-dir="$GNULIB_SRCDIR"/.git fetch
+    fi
     (cd "$GNULIB_SRCDIR" && git checkout "$GNULIB_REVISION") || cleanup_gnulib
   fi