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

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Low
    • None
    • Affects Version/s: 3.10.0
    • None
    • Environment:

      Linux, stash 3.10.0, JDK8

      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.

            Assignee:
            Unassigned
            Reporter:
            Bradley Baetz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: