Do not continue if we are not in proper git directory.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
No need to cleanup if .git is missing.

Signed-off-by: Marko Saukko <marko.saukko@jollamobile.com>
As this is called usually before other checks lets hide errors by doing nothing when there is nothing to do.

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