Fix error in using repository.py
Fix bug in more general case
repository.py: cleaner workflow in init_repository()
Merge pull request #814 from wpoely86/gitbug

Fix error in using repository.py