Perform one git-status query instead of two

This is very beneficial on large repositories.
In one such large repo the running time dropped from 1.55 sec to 0.80 sec.