diff options
author | Miklos Vajna <vmiklos@frugalware.org> | 2008-02-21 00:07:40 +0100 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-29 15:12:31 -0500 |
commit | c1b152c745c86db1138c3e38d1539baf417c98c3 (patch) | |
tree | 081b3c411b69208dec544d33fde3b44d58b77ac8 | |
parent | 28c96f6a575021fa8d93f7bba79ffcdb2027d4e1 (diff) |
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.
-rw-r--r-- | debian/control | 2 | ||||
-rwxr-xr-x | unclean.d/50test | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/debian/control b/debian/control index 2a8cb30..dd33cef 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,7 @@ Homepage: http://kitenet.net/~joey/code/etckeeper/ Package: etckeeper Architecture: all Section: admin -Depends: metastore, git-core (>= 1:1.5.3.4) | mercurial, ${misc:Depends} +Depends: metastore, git-core (>= 1:1.5.4) | mercurial, ${misc:Depends} Description: store /etc in git or mercurial The etckeeper program is a tool to let /etc be stored in a git or mercurial repository. It hooks into APT to automatically commit changes made to /etc 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 |