]> code.delx.au - gnu-emacs/commitdiff
Do not require that .git be a directory
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 18:12:15 +0000 (11:12 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Apr 2016 18:12:39 +0000 (11:12 -0700)
Problem reportyed by Phillip Lord.
* admin/update_autogen, autogen.sh, build-aux/gitlog-to-emacslog:
* configure.ac, make-dist:
Do not require that .git be a directory, as 'git worktree' makes
it a file and not a directory.

admin/update_autogen
autogen.sh
build-aux/gitlog-to-emacslog
configure.ac
make-dist

index 199a3aad093d633da209681429210f8571f9e762..1e8aae2bd4446d712baa5b8409a6a63c867d77f3 100755 (executable)
@@ -49,7 +49,7 @@ cd ../
 
 if [ -d .bzr ]; then
     vcs=bzr
-elif [ -d .git ]; then
+elif [ -e .git ]; then
     vcs=git
 else
     die "Cannot determine vcs"
index 904246509faf75d727e3c82347eb3cb513cc54d2..2e10a77cb3731e5b072e8eebc5ff577edee3c4a9 100755 (executable)
@@ -330,7 +330,7 @@ fi
 
 if test ! -f configure; then
     echo "You can now run '$0 autoconf'."
-elif test -d .git && test $git_was_ok = false && test $do_git = false; then
+elif test -e .git && test $git_was_ok = false && test $do_git = false; then
     echo "You can now run '$0 git'."
 elif test ! -f config.status ||
        test -n "`find src/stamp-h.in -newer config.status`"; then
index 5c187f5eae01c3c608a587c78c7638b506d27d51..6b9cfc145bcd3a798be0869bc2a8472d7954bf9f 100755 (executable)
@@ -68,7 +68,7 @@ if [ -f "$output" ]; then
 fi
 
 # If this is not a Git repository, just generate an empty ChangeLog.
-test -d .git || {
+test -e .git || {
   >"$output"
   exit
 }
index 790ff84365e9ea1c2927cbc3d1fc37a4a1246407..8f311cf78721d111224aca0cd6b16bb0dbe6bcfd 100644 (file)
@@ -874,11 +874,11 @@ AC_ARG_ENABLE([gcc-warnings],
    gl_gcc_warnings=$enableval],
   [# By default, use 'warn-only' if it looks like the invoker of 'configure'
    # is a developer as opposed to a builder.  This is most likely true
-   # if GCC is recent enough and there is a .git subdirectory;
+   # if GCC is recent enough and there is a .git directory or file;
    # however, if there is also a .tarball-version file it is probably
    # just a release imported into Git for patch management.
    gl_gcc_warnings=no
-   test -d "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version &&
+   test -e "$srcdir"/.git && test ! -f "$srcdir"/.tarball-version &&
      gl_GCC_VERSION_IFELSE([5], [3], [gl_gcc_warnings=warn-only])]
 )
 
index 1cd1a50d75a6a7ab420c9bfb7f8e64126dadea3e..c0b0a0466f28e1c191fbd77de78e565ee4df4c47 100755 (executable)
--- a/make-dist
+++ b/make-dist
@@ -284,7 +284,7 @@ echo "Creating top directory: '${tempdir}'"
 mkdir ${tempdir}
 
 if [ "$changelog" = yes ]; then
-  if test -d .git; then
+  if test -e .git; then
     echo "Making top-level ChangeLog"
     make ChangeLog CHANGELOG=${tempdir}/ChangeLog || \
       { x=$?; echo "make ChangeLog FAILED (try --no-changelog?)" >&2; exit $x; }