Fix small bug in update of .cvsignore or .gitignore.
authorBruno Haible <bruno@clisp.org>
Mon, 29 Dec 2008 22:10:55 +0000 (23:10 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 29 Dec 2008 22:10:55 +0000 (23:10 +0100)
ChangeLog
gnulib-tool

index e64c5d4dce7881bad6feb47b86625704c976bbb7..0b68f9b92baa01a60338934ac9745c44265ec1d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-29  Bruno Haible  <bruno@clisp.org>
+
+       * gnulib-tool (func_import): When generating sed-ignore-removed, handle
+       files in subdirectories correctly.
+       Reported by Ralf Wildenhues.
+
 2008-12-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * gnulib-tool (func_update_ignorelist): Use 'join - FILE'
index 391b6b6d2253c43d17010c181f922b048989e25b..67ae56c3981323c9f35297097a6e4fad2856908a 100755 (executable)
@@ -3464,8 +3464,8 @@ s,//*$,/,'
               if $doit; then
                 echo "Updating $destdir/$dir$ignore (backup in $destdir/$dir${ignore}~)"
                 mv -f "$destdir/$dir$ignore" "$destdir/$dir$ignore"~
-                { sed -e 's,^,/^,' -e 's,$,\$/d,' < "$tmp"/ignore-removed
-                  if test -n "$anchor"; then sed -e "s,^,/^${doubly_escaped_anchor}," -e 's,$,\$/d,' < "$tmp"/ignore-removed; fi
+                { sed -e 's,/,\\/,g' -e 's,^,/^,' -e 's,$,\$/d,' < "$tmp"/ignore-removed
+                  if test -n "$anchor"; then sed -e 's,/,\\/,g' -e "s,^,/^${doubly_escaped_anchor}," -e 's,$,\$/d,' < "$tmp"/ignore-removed; fi
                 } > "$tmp"/sed-ignore-removed
                 { cat "$destdir/$dir$ignore"~
                   sed -e "s|^|$anchor|" < "$tmp"/ignore-added