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

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
create a git repository with a master branch and readme .