Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7503

"Prevent changes without a pull request" restriction doesn't prevent initial commit

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Low
    • None
    • 3.10.0
    • None
    • Linux, stash 3.10.0, JDK8

    Description

      The "Prevent changes without a pull request" branch permission in stash 3.10 doesn't stop an initial commit to a matching branch. To reproduce:

      • Create a pattern restriction on refs/heads/release/** with the "Prevent changes without a pull request" checkbox checked
      • git clone http://admin@localhost:7990/stash/scm/project_1/rep_1.git
      • cd rep_1
      • git checkout -b release/1.2.3
      • echo "TEST" > README
      • git add README; git commit -m TEST README
      • git push (this succeeds, but should fail)
      • echo "TEST2" >> README; git commit -m TEST2 README
      • git push (this fails, as expected)

      I'm not sure if this is intentional - the branch has to be created somehow in order to do the pull request, but allowing brand new commits as part of the creation seems wrong.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              06fbb7509c24 Bradley Baetz
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: