diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-01-04 17:38:10 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-01-04 17:38:10 -0500 |
commit | 788ae5a34c0fad2e3c0788a745400a138d735195 (patch) | |
tree | 2517eb3ccf206f4ed7b6ef6a1d543c87caaf2e41 /pre-commit.d/20warn-special-file | |
parent | 69739dd0341ba72a645344ea14658f0ede006079 (diff) | |
parent | fd4a85189390d6e6f022eb8f71fcecb5d5f82958 (diff) |
Merge branch 'hg'
Significantly refactored
Diffstat (limited to 'pre-commit.d/20warn-special-file')
-rwxr-xr-x | pre-commit.d/20warn-special-file | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pre-commit.d/20warn-special-file b/pre-commit.d/20warn-special-file index cb4d019..42e812b 100755 --- a/pre-commit.d/20warn-special-file +++ b/pre-commit.d/20warn-special-file @@ -1,9 +1,12 @@ #!/bin/sh set -e -special=$(find -not -type d -not -type f -not -type l | grep -v /.git/) || true -if [ -n "$special" ]; then - echo "etckeeper warning: special files could cause problems with git:" >&2 - echo "$special" >&2 + +if [ "$VCS" = git ] || [ "$VCS" = hg ]; then + special=$(find -not -type d -not -type f -not -type l | 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 |