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-hardlinks | |
parent | 69739dd0341ba72a645344ea14658f0ede006079 (diff) | |
parent | fd4a85189390d6e6f022eb8f71fcecb5d5f82958 (diff) |
Merge branch 'hg'
Significantly refactored
Diffstat (limited to 'pre-commit.d/20warn-hardlinks')
-rwxr-xr-x | pre-commit.d/20warn-hardlinks | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/pre-commit.d/20warn-hardlinks b/pre-commit.d/20warn-hardlinks index 3dd7a96..8716dbd 100755 --- a/pre-commit.d/20warn-hardlinks +++ b/pre-commit.d/20warn-hardlinks @@ -1,7 +1,10 @@ #!/bin/sh set -e -hardlinks=$(find -type f -not -links 1 | grep -v /.git/) || true -if [ -n "$hardlinks" ]; then - echo "etckeeper warning: hardlinked files could cause problems with git:" >&2 - echo "$hardlinks" >&2 + +if [ "$VCS" = git ] || [ "$VCS" = hg ]; then + hardlinks=$(find -type f -not -links 1 | grep -v /.git/) || true + if [ -n "$hardlinks" ]; then + echo "etckeeper warning: hardlinked files could cause problems with $VCS:" >&2 + echo "$hardlinks" >&2 + fi fi |