You need to make sure that both of the following properties are true:
There is no difference between HEAD and index cache
git diff-index --cached HEAD
There are no differences between the index and the working tree:
git diff-files
--quiet, ( git 1.4). git 1.4, --quiet , - .
. git diff - . .
, git_version.sh script:
git_dirty=yes
if [ "x$($GIT diff-files)" = "x" ] && [ "x$($GIT diff-index --cached HEAD)" = "x" ]; then
git_dirty=no
fi
git version >= 1.5, if git diff-files --quiet && git diff-index --quiet --cached HEAD; then .
. ( , Antony interactive git diff HEAD --quiet) HEAD. , , , , , HEAD. SHA1 git describe, , HEAD , .