+1  A: 
ephemient
Don't use git-status. Use git-ls-files and git-diff / git-diff-files instead.
Jakub Narębski
What’s wrong with git-status?
Bombe
git-status is so called porcelain and it meant for user, and not for scripting. Its output can change without notice.
Jakub Narębski
A: 

You can use "git ls-files --modified --deleted --exclude-standard" to list all modified and deleted files (--exclude-standard is not probably needed there, but just in case you want to list all unknown files that are not ignored with --other...). You can then check if the output of this command is empty.

Or you can check the exit status of "git diff --quiet HEAD" if you want to check if "git commit -a" would pick up anything, or "git diff --cached --quiet HEAD" if you want to check if "git commit" would pick anything (or one of its plumbing relatives: git-diff-files or git-diff-index).

Jakub Narębski