bootstrap: use git's --depth=N option only if it's supported
authorJim Meyering <meyering@redhat.com>
Fri, 10 Oct 2008 06:34:05 +0000 (08:34 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 10 Oct 2008 06:34:05 +0000 (08:34 +0200)
* build-aux/bootstrap: Work with git-1.4.4.4, which does not
recognize the --depth option.  Reported by Pádraig Brady.

ChangeLog
build-aux/bootstrap

index 838a82223ea75799ad935558e4d2d08b6a5fa8a2..ef7e54f057f92a9277ccf8f66266e4036c909566 100644 (file)
--- 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'.
index 0d7668643faad1e5448ccd69a4c0971b5952839e..2087bab8fc534834a3edb5476fc644fd5abff432 100755 (executable)
@@ -262,7 +262,8 @@ case ${GNULIB_SRCDIR--} in
 
     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