With one of our repos, when we create pull requests to merge our develop branch to a release branch, we always see a lot of extra code changes that were already previously committed to develop, which we do not see when we compare branches at the command line with "git diff develop release-x.x.x"
Could this be a known bug in bitbucket or is this a common occurrence if there is an incorrect setting in our repo?
Hi Will and welcome to the community!
The command you are using is equivalent to a two-dot diff:
git diff develop..release-x.x.x
This takes into account changes in both branches.
Pull request diffs in Bitbucket Cloud are using a three-dot diff instead:
git diff develop...release-x.x.x
A three-dot diff shows only changes in the source branch starting at a common ancestor of the two branches.
Documentation on Git Diff: https://git-scm.com/docs/git-diff
We changed the algorithm we use in pull request diffs last year:
If you want to see changes to the destination branch in the diff, you can merge the destination branch into the source branch.
We have a feature request to provide the preview-merge diff type (that we were previously using) on demand that you can vote for:
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.