From f43a320036b01fcdedc762d4e8ea1f657b9cd00e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Dec 24 2015 09:24:38 +0000 Subject: Make the requests repo not accepting non-fastforward pushes as well --- diff --git a/pagure/lib/__init__.py b/pagure/lib/__init__.py index f10ad67..eb67883 100644 --- a/pagure/lib/__init__.py +++ b/pagure/lib/__init__.py @@ -992,7 +992,8 @@ def new_project(session, user, name, blacklist, raise pagure.exceptions.RepoExistsException( 'The tickets repo "%s" already exists' % project.path ) - pygit2.init_repository(ticketrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) + pygit2.init_repository( + ticketrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) requestrepo = os.path.join(requestfolder, project.path) if os.path.exists(requestrepo): @@ -1002,7 +1003,8 @@ def new_project(session, user, name, blacklist, raise pagure.exceptions.RepoExistsException( 'The requests repo "%s" already exists' % project.path ) - pygit2.init_repository(requestrepo, bare=True) + pygit2.init_repository( + requestrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) pagure.lib.notify.log( project, @@ -1301,8 +1303,8 @@ def fork_project(session, user, repo, gitfolder, raise pagure.exceptions.RepoExistsException( 'The tickets repo "%s" already exists' % project.path ) - pygit2.init_repository(ticketrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) - + pygit2.init_repository( + ticketrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) requestrepo = os.path.join(requestfolder, project.path) if os.path.exists(requestrepo): @@ -1312,7 +1314,8 @@ def fork_project(session, user, repo, gitfolder, raise pagure.exceptions.RepoExistsException( 'The requests repo "%s" already exists' % project.path ) - pygit2.init_repository(requestrepo, bare=True) + pygit2.init_repository( + requestrepo, bare=True, mode=pygit2.GIT_REPOSITORY_INIT_SHARED_GROUP) pagure.lib.notify.log( project,