has_sha1_file: don't bother if we are not in a repository