Check for a few git variables before doing anything.