summaryrefslogtreecommitdiff
path: root/unclean.d/50test
diff options
context:
space:
mode:
Diffstat (limited to 'unclean.d/50test')
-rwxr-xr-xunclean.d/50test8
1 files changed, 8 insertions, 0 deletions
diff --git a/unclean.d/50test b/unclean.d/50test
new file mode 100755
index 0000000..0495815
--- /dev/null
+++ b/unclean.d/50test
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$VCS" = git ]; then
+ [ -d .git ] && ! LANG=C git-status 2>&1 | grep -q "working directory clean"
+elif [ "$VCS" = hg ]; then
+ [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$"
+fi