When git tree is empty then we need additional checks.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>