def create_git_repository(test_case, bare=False):
    directory = FilePath(test_case.mktemp())
    repository = Repo.init(path=directory.path, bare=bare)

    if not bare:
        directory.child('README').makedirs()
        directory.child('README').touch()
        repository.index.add(['README'])
        repository.index.commit('Initial commit')
        repository.create_head('master')
    return repository
Check if we have entered the shutdown state, when no running nodes
dataset/ETHPy150Open ClusterHQ/flocker/admin/test/test_release.py/create_git_repository--crossover with--dataset/ETHPy150Open coreemu/core/daemon/core/session.py/Session.checkshutdown