Beispiel #1
0
def init_bare_repo_signal(sender, instance, created, **kwargs):
    """
        Initialize a bare git repository on server's deposit after it's creation.
    """

    if created:
        # Create repository folder under GIT_DEPOSIT_ROOT/username/repository.git and initialize it as bare.
        repository_location = Repo.get_repository_location(instance.owner.username, instance.name)
        repo = Repo(repository_location)
        repo.init_bare_repo()
Beispiel #2
0
def init_bare_repo_signal(sender, instance, created, **kwargs):
    """
        Initialize a bare git repository on server's deposit after it's creation.
    """

    if created:
        # Create repository folder under GIT_DEPOSIT_ROOT/username/repository.git and initialize it as bare.
        repository_location = Repo.get_repository_location(
            instance.owner.username, instance.name)
        repo = Repo(repository_location)
        repo.init_bare_repo()