Does not prevent force pushing when force pushing multiple branches.

Issue #1 on hold
Peter Naimoli created an issue

Setup: 1) configure your repository with 'git config push.default matching'. 2) set Force Field to only reject force pushes to 'master'. 3) make changes to both 'master', and 'anotherbranch' 4) push --force

Desired behaviour: reject the push since 'master' is set up to reject force pushes.

Actual behaviour: accepts the entire push because 'anotherbranch' is not set up to reject force pushes.

Comments (2)

  1. Carolyn Van Slyck repo owner

    I am unable to reproduce this on the latest version (Force Field v1.1 running on Stash 3.0.1).

    Here were my steps to reproduce, let me know if I'm missing something.

    git config push.default matching
    git checkout -b foobar
    git push origin foobar
    git commit --amend -m "testing force push"
    git checkout -b master
    git commit --amend -m "testing force push"
    git push -f
    
    remote: =================================
    remote: Force Field
    remote: The repository administrator has disabled force pushes to refs/heads/master
    remote: =================================
    To http://admin@lilc:7990/stash/scm/project_1/rep_1.git
     ! [remote rejected] foobar -> foobar (pre-receive hook declined)
     ! [remote rejected] master -> master (pre-receive hook declined)
    
  2. Log in to comment