Performance fix: 'git rev-parse HEAD' is faster than 'git status'.