view build-aux/gnulib-bootstrap-git-fetch.diff @ 31120:4581402b1c5b

uniquetol.m: Simplify code for "ByRows" option (bug #59850). Use standard form for error() messages and update input validation BIST tests to pass. * uniquetol.m: Use "real" instead of "non-complex" in documentation and in error() messages. Update input validation BIST tests to pass with new messages. Update documentation example so that text matches actual output of Octave. Use isreal() rather than iscomplex() in input validation. New variable "calc_indices" which indicates whether outputs ia, ic should be calculated. Use "calc_indices" to reduce running unnecessary code. In ByRows code, eliminate Iall variable and use J for the same purpose. Eliminate linear search ("any (Iall == i)") with direct lookup ("if (J(i))"). Eliminate variables sumeq, ii. Introduce intermediate variable "Arow_i" for clarity. Rename "equ" to "eq_rows" for clarity. Use '!' instead of '~' for logical negation.
author Rik <rik@octave.org>
date Tue, 05 Jul 2022 17:14:44 -0700
parents a3df57fa5c5d
children e98fb9b4be86
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 --git a/bootstrap b/bootstrap
index 8f76d6962..2d0a06376 100755
--- a/bootstrap
+++ b/bootstrap
@@ -670,6 +670,11 @@ if $use_gnulib; then
         || cleanup_gnulib
 
       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
     GNULIB_SRCDIR=$gnulib_path
     ;;
@@ -704,6 +709,10 @@ if $use_gnulib; then
 
   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