Optionally disable diff on specific files in a pull request (BB-11005)

Issue #10032 open
stephen mathieson
created an issue

We've got a few repositories which keep "built" css and javascript files checked in. We need to check these files in so our package manager (component) is able to access them at install-time, rather than forcing it to pre-process our stylesheets/templates (stylus, less, jade, whatever).

My request is that we can somehow tell the pull request view (https://bitbucket.org/user/repo/pull-request/XYZ/) to not display a diff on a few specific files. This could be a setting at the "Create pull request" step, the repository settings panel.. anywhere, really. This would make code reviews significantly easier and much faster.

An example repo structure would look like this:

$ tree
├── Makefile
├── Readme.md
├── cache.js
├── component.json
├── example.html
├── index.js
├── package.json
├── style.css # ignore diff
├── style.styl # show diff
├── template.jade # show diff
├── template.js # ignore diff
├── test
│   ├── cache.js
│   ├── generator.js
│   └── index.html
└── test-server.pid

Comments (41)

  1. Jeff Clark

    Some files updated by development tools are re-generated or re-scaffolded but are not of value to a code review / pull request. This would be a great feature; please tell your friends to vote for it.

  2. Tom Worster

    composer.lock, js and css files generated by build script, combined, and combined+minified, plus their source maps, they all need to be in the repo but it makes no sense to display them in a commit or PR diff. indeed, Bitbucket's client script for displaying the diffs typically gives up because of these "object" files that ire irrelevant to code review

  3. Jeffrey Labonski


    npm's package-lock.json is a utter mess of noise in a PR. Must be checked in, can't be meaningfully reviewed. Man, it'd be great to have some clickable HIDDEN icons next to the file list and hide the diff's div by default.

  4. Daniel Walz

    +1 Using C++/JUCE where many files are autogenerated. We don't want the project generator to be installed on every developers machines, hence we put the generated code in source control. Hiding certain files or folder would be really helpful (maybe not necessarily hiding it, but having them collapsed, so the meaningful diffs could be easier spotted.)

  5. Ronald Rey

    Hello guys,

    I am the current maintainer of the Chrome extension refined-bitbucket and I've just released version 3.0.0 a few minutes ago. That version has two new features which I developed specifically to tackle this issue, "autocollapse" and "pullrequest-ignore", among others.

    Check out the README on Github to see some screenshots and gifs and a description of other features available on it. If you find any weird behavior or have any ideas for possible improvements let me know through an issue or hit me up on twitter @reyronald.

    Hope you can find it useful since apparently there's no intention for this to be solved natively by Atlassian.

  6. Log in to comment