#551 Non fast forward denied for issues repo
Merged 8 years ago by pingou. Opened 8 years ago by vivekanand1101.
vivekanand1101/pagure non-ff-push-deny  into  master

file modified
+3 -2
@@ -989,7 +989,7 @@ 

          raise pagure.exceptions.RepoExistsException(

              'The tickets repo "%s" already exists' % project.path

          )

-     pygit2.init_repository(ticketrepo, bare=True)

+     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):
@@ -1298,7 +1298,8 @@ 

          raise pagure.exceptions.RepoExistsException(

              'The tickets repo "%s" already exists' % project.path

          )

-     pygit2.init_repository(ticketrepo, bare=True)

+     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):

no initial comment

This is the configuration of one of the repos: http://img.susepaste.org/17990242

Also, there were only two mode options which allowed the recieve.denyNonFastforwards = true option in pygit2. The above one and the GIT_REPOSITORY_INIT_SHARED_ALL.

check this

Seems to be present in the pygit2 version we're using, so cool.

Thanks for fixing this!

Metadata