Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Code Changes Appear in Pull Request

Andrew Liew October 20, 2022

Hi,

I have a scenario where the first branch is the master branch as the source of truth, dev branch as integration stage and feature branch as development stage.

There are ongoing development, integration and release during the software lifecycle. The latest code exists in feature, and later moves to dev and subsequently to master.

new feature<--master

feature--->dev

feature-->master

After I created a feature branch from master branch, in this new feature branch, there is a list of changes (grey out) and one commit in bold (without grey out) appearing from feature to dev branch. There is no code change done added to this feature branch. 

What does this mean? 

Is the list of code changes to be merged into dev branch?

BitbucketFeature-master.JPG

Thanks,

Andrew

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 24, 2022

Hey Andrew,

 

The reason you may be seeing a difference in the PR screen is due to a change in how we calculate diffs - this is detailed in the following article:
https://bitbucket.org/blog/improving-performance-on-complex-diffs  

The older method for calculating diffs compared the tips of the source and destination along with the commit where the two branches diverged. The resultant diff produced was an outcome of how the diff will look if the two branches were merged. This was also called as a Preview Merge diff for the same reason. However, we had to calculate the merge at each commit separately and this became a very expensive process leading to slow down of diff in complex PRs.

The newer method for calculating diffs only compares two commits instead of the three way diff we used earlier. We compare the tip of the source branch to the merge-base of the two branches. The outcome is a diff that shows how the source branch has changed since it branched off from the destination branch.

The screenshot you have shown me shows diff because the branch is 128 commits behind the dev branch.
The way to get rid of the diff (as you say the branches are the same) is to introduce the changes from the destination into the source branch. When you click on Sync Now, it does the same task - a merge from the destination branch onto the source branch.

Hope this makes sense.

Cheers!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events