[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#549354: Making a copy of the patch



Albert's patch has moved to http://www.docunext.com/wiki/etckeeper.html

It is also attached here.

Francois
diff --git a/etckeeper/pre-commit.d/20warn-special-file b/etckeeper/pre-commit.d/20warn-special-file
index f246fb1..600da7c 100755
--- a/etckeeper/pre-commit.d/20warn-special-file
+++ b/etckeeper/pre-commit.d/20warn-special-file
@@ -1,12 +1,21 @@
 #!/bin/sh
 set -e

-if [ "$VCS" = git ] || [ "$VCS" = hg ] || [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then
-       special=$(find . -not -type d -not -type f -not -type l | grep -v '/\(.git\|.hg\|.bzr\|_darcs\)/') || true
+
+if [ "$VCS" = hg ] || [ "$VCS" = bzr ] || [ "$VCS" = darcs ]; then
+       special=$(find . -not -type d -not -type f -not -type l | grep -v '/\(.hg\|.bzr\|_darcs\)/') || true
        if [ -n "$special" ]; then
                echo "etckeeper warning: special files could cause problems with $VCS:" >&2
                echo "$special" >&2
        fi
 fi

+if [ "$VCS" = git ]; then
+    special=$(find . -not -type d -not -type f -not -type l -exec git ls-files {} \; | grep -v '/\.git/') || true
+    if [ -n "$special" ]; then
+        echo "etckeeper warning: special files could cause problems with $VCS:" >&2
+        echo "$special" >&2
+    fi
+fi
+
 true

Reply to: