summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommit.d/40git-rm25
-rw-r--r--debian/changelog7
2 files changed, 10 insertions, 22 deletions
diff --git a/commit.d/40git-rm b/commit.d/40git-rm
index 26f492a..ae70e1f 100755
--- a/commit.d/40git-rm
+++ b/commit.d/40git-rm
@@ -1,27 +1,8 @@
#!/bin/sh
set -e
-IFS='
-'
-
if [ "$VCS" = git ] && [ -d .git ]; then
- for file in $(git ls-files --deleted); do
- if [ ! -d "$file" ]; then
- # git removes directories when the last file
- # in them is removed, but empty directories
- # may be significant in /etc. Touch a flag file
- # to prevent git from removing the directory.
- dir="$(dirname "$file")"
- flagfile=""
- if [ -d "$dir" ] &&
- [ -n "$(find "$dir" -maxdepth 0 -empty)" ]; then
- flagfile="$dir/.etckeeper-keep-empty"
- touch "$flagfile"
- fi
- git rm --quiet "$file"
- if [ -n "$flagfile" ]; then
- rm -f "$flagfile"
- fi
- fi
- done
+ if ! git add . -u; then
+ echo "etckeeper warning: git add -u failed" >&2
+ fi
fi
diff --git a/debian/changelog b/debian/changelog
index 994f9f5..394d4d5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+etckeeper (0.52) UNRELEASED; urgency=low
+
+ * Rewrote 50git-rm to avoid using git ls-files, and thus avoid encoding
+ problems with filenames.
+
+ -- Joey Hess <joeyh@debian.org> Thu, 13 Jan 2011 14:07:21 -0400
+
etckeeper (0.51) unstable; urgency=low
* Updated Vietnamese translation of debconf templates. Closes: #601921