]> Savannah Git Hosting - gnulib.git/commitdiff
gnulib-tool: Make the .gitignore files handling more consistent.
authorBruno Haible <bruno@clisp.org>
Thu, 21 Mar 2024 14:45:42 +0000 (15:45 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 21 Mar 2024 14:45:42 +0000 (15:45 +0100)
* gnulib-tool.sh (func_done_dir): Ignore the presence or absence of a
.git directory if there is a .gitignore file in the same place.
* pygnulib/GLImport.py (GLImport._done_dir_): Likewise.

ChangeLog
gnulib-tool.sh
pygnulib/GLImport.py

index 09ab4ac158c177ddfd3cc2eacf965c33714b6b98..e92b0cac2f01f992e13a09b77d158a1ab375e372 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-03-21  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Make the .gitignore files handling more consistent.
+       * gnulib-tool.sh (func_done_dir): Ignore the presence or absence of a
+       .git directory if there is a .gitignore file in the same place.
+       * pygnulib/GLImport.py (GLImport._done_dir_): Likewise.
+
 2024-03-20  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool.sh: Undocument the --[no-]cache-modules options.
index 2081ed049eeab4fc9b350be7a397956b32fdcca6..f1a36ec0232ddfb38e1998624206dcf54d4101d5 100755 (executable)
@@ -6290,7 +6290,7 @@ s,//*$,/,'
         if test -d "$destdir/CVS" || test -d "$destdir/${dir}CVS" || test -f "$destdir/${dir}.cvsignore"; then
           func_update_ignorelist .cvsignore
         fi
-        if test -d "$destdir/.git" || test -f "$destdir/${dir}.gitignore"; then
+        if test -d "$destdir/.git" || test -f "$destdir/.gitignore" || test -f "$destdir/${dir}.gitignore"; then
           func_update_ignorelist .gitignore
         fi
       }
index 4c7b62a8df79f9c936f9eaa8de4a933ccc83eb45..66b63ef08e39139f7d57b64959d68ceefe6eff69 100644 (file)
@@ -781,6 +781,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
             self._update_ignorelist_(directory, '.cvsignore',
                                      dirs_added, dirs_removed)
         if (isdir(joinpath(destdir, '.git'))
+                or isfile(joinpath(destdir, '.gitignore'))
                 or isfile(joinpath(destdir, directory, '.gitignore'))):
             self._update_ignorelist_(directory, '.gitignore',
                                      dirs_added, dirs_removed)