Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-11961

Show changes to file permissions in diffs and pull requests

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Sometimes a developer will accidentally change the permissions on a file, and check in the change. It would be good to spot these changes before they cause problems, ideally as part of code review when looking at a pull request.

      The current web interface doesn't expose this information.

      Here's an example commit diff. Which files have changed permissions?

      The answer is both of them, but it's hard to spot. The fact that the latter is in the diff with no apparent changes is a hint that the second file has different permissions; I can't see anything to indicate the change in the first file.

      Even when I know the permissions have changed, I don't know what the old/new permissions are; this is also useful.

      Please add something to the diff view that:

      • Highlights when the file permissions have changed
      • Tells me the old and new permissions

            [BCLOUD-11961] Show changes to file permissions in diffs and pull requests

            Since comments on closed tickets may not receive much attention, I filed https://jira.atlassian.com/browse/BCLOUD-19589 as a new suggestion that's explicitly about showing changes to the execute bit status in the pull request interface.

            Nick Coghlan added a comment - Since comments on closed tickets may not receive much attention, I filed https://jira.atlassian.com/browse/BCLOUD-19589 as a new suggestion that's explicitly about showing changes to the execute bit status in the pull request interface.

            @awilkes The Pull Request interface doesn't report the execute bit status, so it's relatively easy to accidentally add a script file without its execute bit set, or to move a script file, and accidentally clear the execute bit in the process (or vice-versa: incorrectly mark a data file as executable).

            Jesse's original response misunderstood the request as being about being able to preserve more than just the execute bit status, which isn't the case: all the examples given are just about tracking the execute bit status.

            Nick Coghlan added a comment - @awilkes The Pull Request interface doesn't report the execute bit status, so it's relatively easy to accidentally add a script file without its execute bit set, or to move a script file, and accidentally clear the execute bit in the process (or vice-versa: incorrectly mark a data file as executable). Jesse's original response misunderstood the request as being about being able to preserve more than just the execute bit status, which isn't the case: all the examples given are just about tracking the execute bit status.

            Attachment 2217068611-fileperms2.png has been added with description: Originally embedded in Bitbucket issue #11961 in site/master

            Deleted Account (Inactive) added a comment - Attachment 2217068611-fileperms2.png has been added with description: Originally embedded in Bitbucket issue #11961 in site/master

            rdsteiner added a comment -

            +1 definitely needed

            rdsteiner added a comment - +1 definitely needed

            +1 this needs to be reopened

            Brian Maissy added a comment - +1 this needs to be reopened

            baras added a comment -

            +1 This is definitely required.
            Like the reporter @alexwlchan said, reviewers need to see if a developer accidentally committed changes to the file mode.

            I just updated my branch and got this:

            #!bash
            
            
             21 files changed, 182 insertions(+), 31 deletions(-)
             mode change 100644 => 100755 advanced-custom-field.xml
             mode change 100644 => 100755 css/skins/style-black.css
             mode change 100644 => 100755 css/skins/style-black.css.map
             mode change 100644 => 100755 css/skins/style-black.min.css
             mode change 100644 => 100755 css/skins/style-black.min.css.map
            

            baras added a comment - +1 This is definitely required. Like the reporter @alexwlchan said, reviewers need to see if a developer accidentally committed changes to the file mode. I just updated my branch and got this: #!bash 21 files changed, 182 insertions(+), 31 deletions(-) mode change 100644 => 100755 advanced-custom-field.xml mode change 100644 => 100755 css/skins/style-black.css mode change 100644 => 100755 css/skins/style-black.css.map mode change 100644 => 100755 css/skins/style-black.min.css mode change 100644 => 100755 css/skins/style-black.min.css.map

            @tipjosh

            Just adding to this that the only way I could see the file mode change was to drill into the commit and view the raw commit using a link through the BitBucket UI.

            JonathanTIP added a comment - @tipjosh Just adding to this that the only way I could see the file mode change was to drill into the commit and view the raw commit using a link through the BitBucket UI.

            tipjosh added a comment -

            Can this be reopened @awbb @jyowell ? The executable bit change is not being displayed in the UI, unless you dig in and view the raw commit message. We encountered a similar issue to Christopher today, in not seeing a file mode change.
            @JonathanTIP

            tipjosh added a comment - Can this be reopened @awbb @jyowell ? The executable bit change is not being displayed in the UI, unless you dig in and view the raw commit message. We encountered a similar issue to Christopher today, in not seeing a file mode change. @JonathanTIP

            +1

            would be nice to have some info about modes like in git (old and new modes) or simply if executable bit was added or removed

            #!diff
            $ git show
            commit cab355374da94f186ab0672db3c4a66d5f010c46 (HEAD)
            Author: Krzysztof Wasilewski <>
            Date:   Tue Jun 5 11:19:21 2018 +0200
            
                Allow exec script.
            
            diff --git a/a2.sh b/a2.sh
            old mode 100644
            new mode 100755
            
            

            krzysztof_wasilewski_huuuge added a comment - +1 would be nice to have some info about modes like in git (old and new modes) or simply if executable bit was added or removed #!diff $ git show commit cab355374da94f186ab0672db3c4a66d5f010c46 (HEAD) Author: Krzysztof Wasilewski <> Date: Tue Jun 5 11:19:21 2018 +0200 Allow exec script. diff --git a/a2.sh b/a2.sh old mode 100644 new mode 100755

            lodotek added a comment -

            I agree Chris.... +1

            lodotek added a comment - I agree Chris.... +1

              Unassigned Unassigned
              ac133c35-2123-46bf-9a68-f093de64a177 Deleted Account (Inactive)
              Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: