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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Low
    • Resolution: Won't Fix
    • Affects Version/s: 3.10.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      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

              Assignee:
              Unassigned Unassigned
              Reporter:
              bradley.baetz Bradley Baetz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: