When creating a pull request into a feature branch that was rebased from master, Bitbucket is showing incorrect diffs. The diff appears to be comparing against master instead of the target feature branch, despite the PR being created against the feature branch.
Steps to Reproduce:
- Have a feature branch that was rebased from master
- Create a PR targeting this feature branch (not master)
- Observe the diff in the PR
- Compare this with:
- Direct file comparison between the two branches in Bitbucket's file browser
- Local git diff between the same branches
Expected Behavior:
- PR diff should show only the actual differences between the source and target feature branch
- PR diff should match:
- Manual file inspection in Bitbucket's file browser
- Local git diff results
Actual Behavior:
- PR shows incorrect diffs that appear to be comparing against master instead of the target feature branch
- When inspecting the same files directly in Bitbucket's file browser, the files are identical
- Local git diff shows the correct (no) differences between the branches
Additional Context:
- This appears to be a Bitbucket-specific issue with diff calculation when the target branch is a rebased feature branch
- The diff looks correct if targeting master, suggesting Bitbucket might be incorrectly using master as the merge base for the diff calculation