git diff --quiet
returns exit code as documented.
git log --quiet
behaves exactly as without quiet.
Did I miss something from the docs:
--quiet
Disable all output of the program. Implies --exit-code.
git 1.6.0
This is supposed to be used in a script to compare mybranch with origin/mybranch, to know should I push it or not.