def is_git_repo(repo_dir):
    """Return True if the directory is inside a git repo."""
    command = ['git', 'rev-parse']
    try:
        execute_git_command(command, repo_dir=repo_dir)
    except exceptions.SimplGitCommandError:
        return False
    else:
        return True
def is_git_repo ( repo_dir ) : command = [ 'git' , 'rev-parse' ] try : execute_git_command ( command , repo_dir = repo_dir ) except exceptions . SimplGitCommandError : return False else : return True
Return True if the directory is inside a git repo.