Uploaded image for project: 'Stash'
  1. Stash
  2. STASH-2507

Add permission to disable branch and tag deletion via git push

    Details

      Description

      It would be useful to have a separate permission to disable branch and tag deletion done via git push.

      Ideally, this would be controlled independently of any permissions to delete branches and tags from the Stash web interface and is just intended to prevent accidental git push branch deletions.

        Issue Links

          Activity

          Hide
          jmitchell Jeff Mitchell added a comment -

          Gitolite's reflog has been able to help with that kind of problem for a long time, provided you try to recover before the server's next GC (I wouldn't be surprised if GitHub has the right software on the backend to allow this too, but don't expose it on the frontend) – and if you have proper backups, then the GC isn't really an issue either. Careful what you read from Collabnet, as they are really keen to point out the problems you can possibly run into with Git to promote their SVN solution. Part of this problem was their reliance on GitHub.

          That all said, because Stash isn't GitHub, it doesn't negate the need for something like this for Stash. Force pushes need to be recoverable, at least for some period of time. Even in the face of proper backups, which could require some fairly substantial time to fetch off tape and could still cost a day of work.

          Show
          jmitchell Jeff Mitchell added a comment - Gitolite's reflog has been able to help with that kind of problem for a long time, provided you try to recover before the server's next GC (I wouldn't be surprised if GitHub has the right software on the backend to allow this too, but don't expose it on the frontend) – and if you have proper backups, then the GC isn't really an issue either. Careful what you read from Collabnet, as they are really keen to point out the problems you can possibly run into with Git to promote their SVN solution. Part of this problem was their reliance on GitHub. That all said, because Stash isn't GitHub, it doesn't negate the need for something like this for Stash. Force pushes need to be recoverable, at least for some period of time. Even in the face of proper backups, which could require some fairly substantial time to fetch off tape and could still cost a day of work.
          Hide
          alan.qian Alan Qian added a comment -

          Hi @jhinch, do you have any update on your plugin? Is it this one?

          https://bitbucket.org/atlassianlabs/stash-refchange-settings-plugin

          Show
          alan.qian Alan Qian added a comment - Hi @jhinch, do you have any update on your plugin? Is it this one? https://bitbucket.org/atlassianlabs/stash-refchange-settings-plugin
          Hide
          kabir.kochhar Kabir Kochhar added a comment -

          Is there a plugin available in marketplace to restrict branch deletion but allows to create / push changes?

          Show
          kabir.kochhar Kabir Kochhar added a comment - Is there a plugin available in marketplace to restrict branch deletion but allows to create / push changes?
          Show
          michael.villis Michael Villis added a comment - Have you see this one? https://marketplace.atlassian.com/plugins/com.sarav.stash.hooks.protectbranches.ProtectBranches
          Hide
          mark.gillespie1 Mark Gillespie added a comment - - edited

          Will that plugin also prevent deletion of the branch in the Stash Merge UI, where the "Delete Source Branch After Merging" tickbox is?

          EDIT: Sadly it seems not to.

          Show
          mark.gillespie1 Mark Gillespie added a comment - - edited Will that plugin also prevent deletion of the branch in the Stash Merge UI, where the "Delete Source Branch After Merging" tickbox is? EDIT: Sadly it seems not to.

            People

            • Reporter:
              savviness Jesse Johnson
            • Votes:
              74 Vote for this issue
              Watchers:
              71 Start watching this issue

              Dates

              • Created:
                Updated: