On 10/19/2014 11:58 PM, Reuben Thomas wrote:
> It should run something like "git submodule update -- gnulib" rather than 
> just "git submodule update".

Good point.
Proposed fix attached.

thanks,
Pádraig.

>From e94cfb19c8d84a09cd2827ec2f75222c6e854781 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Thu, 23 Oct 2014 13:26:23 +0100
Subject: [PATCH] bootstrap: only update the gnulib submodule

* build-aux/bootstrap: Restrict the "submodule update" command
to the gnulib path.

Reported by Reuben Thomas
---
 ChangeLog           |    6 ++++++
 build-aux/bootstrap |    9 +++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 23234b7..8b98a79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-23  Pádraig Brady  <p...@draigbrady.com>
+
+	bootstrap: only update the gnulib submodule
+	* build-aux/bootstrap: Restrict the "submodule update" command
+	to the gnulib path.
+
 2014-10-18  Paul Eggert  <egg...@cs.ucla.edu>
 
 	symlinkat: port to AIX 7.1
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index ce90bc4..5dbd1b1 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -598,8 +598,8 @@ case ${GNULIB_SRCDIR--} in
   # Note that $use_git is necessarily true in this case.
   if git_modules_config submodule.gnulib.url >/dev/null; then
     echo "$0: getting gnulib files..."
-    git submodule init || exit $?
-    git submodule update || exit $?
+    git submodule init -- "$gnulib_path" || exit $?
+    git submodule update -- "$gnulib_path" || exit $?
 
   elif [ ! -d "$gnulib_path" ]; then
     echo "$0: getting gnulib files..."
@@ -628,13 +628,14 @@ case ${GNULIB_SRCDIR--} in
       # This fallback allows at least git 1.5.5.
       if test -f "$gnulib_path"/gnulib-tool; then
         # Since file already exists, assume submodule init already complete.
-        git submodule update || exit $?
+        git submodule update -- "$gnulib_path" || exit $?
       else
         # Older git can't clone into an empty directory.
         rmdir "$gnulib_path" 2>/dev/null
         git clone --reference "$GNULIB_SRCDIR" \
           "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
-          && git submodule init && git submodule update \
+          && git submodule init -- "$gnulib_path" \
+          && git submodule update -- "$gnulib_path" \
           || exit $?
       fi
     fi
-- 
1.7.7.6

Reply via email to