From c1b152c745c86db1138c3e38d1539baf417c98c3 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 21 Feb 2008 00:07:40 +0100 Subject: use git ls-files instead of git status git status is a porcelain command and should not be used from scripts just to check if the working directory is clean or not. --- unclean.d/50test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unclean.d/50test') diff --git a/unclean.d/50test b/unclean.d/50test index 409d674..ef8ea93 100755 --- a/unclean.d/50test +++ b/unclean.d/50test @@ -2,7 +2,7 @@ set -e if [ "$VCS" = git ]; then - [ -d .git ] && ! LANG=C git status 2>&1 | grep -q "working directory clean" + [ -d .git ] && [ -n "`git-ls-files --modified --deleted --others --exclude-standard`" ] elif [ "$VCS" = hg ]; then [ -d .hg ] && ! hg status 2>&1 | wc -l | grep -q "^0$" fi -- cgit v1.2.3