Details
-
Suggestion
-
Resolution: Fixed
-
None
Description
Git 2.18 includes support for detecting "implicit directory renames"; cases where all the files in directory A have moved to directory B and then a new commit introduces a new file in directory A (See the first bullet point in the release notes).
Implicit directory rename support is enabled by default when using git merge, git cherry-pick and some invocations of git rebase, and, at least in all currently-available Git versions that have it, cannot be disabled.
When implicit directory rename detection fails, it results in new conflict types Bitbucket Server doesn't know how to handle, resulting in a common ancestor diff being displayed (which doesn't show any conflicts) and a blue banner on the pull request overview with a message like "Bitbucket Server could not create the merge diff for this pull request." Performing a merge (or rebase) locally to resolve conflicts and then pushing to the target branch will allow the system to resume displaying the normal merge-based diff.
As implicit directory rename detection cannot be disabled, the only workaround for preventing these new conflict types is to downgrade to Git 2.17 or earlier where the detection doesn't exist.