summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rwxr-xr-xupdate-ignore.d/01update-ignore9
2 files changed, 8 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index a492f97..ca3278f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ etckeeper (0.42) UNRELEASED; urgency=low
* Add *.elc to ignore list (See #491401)
* Add ntp.conf.dhcp to ignore list. (See #491401)
* Add X11/xdm/authdir/authfiles/* to ignore list. Closes: #491401
+ * Fix handling of "#*#" ignores for git and hg.
-- Joey Hess <joeyh@debian.org> Fri, 04 Dec 2009 13:10:28 -0500
diff --git a/update-ignore.d/01update-ignore b/update-ignore.d/01update-ignore
index 3d9cd79..cf25ee7 100755
--- a/update-ignore.d/01update-ignore
+++ b/update-ignore.d/01update-ignore
@@ -37,7 +37,12 @@ ignore() {
glob="$1"
case "$VCS" in
- git|bzr)
+ git)
+ # escape "#" in ignores, as otherwise it may
+ # be considered a comment
+ echo "$glob" | sed 's/#/\\#/g' >>"$file"
+ ;;
+ bzr)
echo "$glob" >>"$file"
;;
hg)
@@ -49,7 +54,7 @@ ignore() {
nl
hg_syntax_printed=1
fi
- echo "$glob" >>"$file"
+ echo "$glob" | sed 's/#/\\#/g' >>"$file"
;;
darcs)
# darcs doesn't understand globs, so we need to