correct .git detection