changeset 10618:dd1bb60fdc2a

bootstrap: use git's --depth=N option only if it's supported * build-aux/bootstrap: Work with git-1.4.4.4, which does not recognize the --depth option. Reported by Pádraig Brady.
author Jim Meyering <meyering@redhat.com>
date Fri, 10 Oct 2008 08:34:05 +0200
parents d43571ee83b5
children 73ac6a6d08a9
files ChangeLog build-aux/bootstrap
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-10-10  Jim Meyering  <meyering@redhat.com>
+
+	bootstrap: use git's --depth=N option only if it's supported
+	* build-aux/bootstrap: Work with git-1.4.4.4, which does not
+	recognize the --depth option.  Reported by Pádraig Brady.
+
 2008-10-09  Bruno Haible  <bruno@clisp.org>
 
 	New module 'ioctl'.
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -262,7 +262,8 @@
 
     trap cleanup_gnulib 1 2 13 15
 
-    git clone --depth 2 git://git.sv.gnu.org/gnulib ||
+    git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
+    git clone $shallow git://git.sv.gnu.org/gnulib ||
       cleanup_gnulib
 
     trap - 1 2 13 15