Skip to content

Compare diff against HEAD if diff_head is passed

Igor Drozdov requested to merge id-master-head-diff into master

Merge request diffs are currently calculated by git diff target...source which compares HEAD of target with the merge base of target and source. This works well until changes from the target branch are merged into the source branch. In this case, we want to compare against HEAD.

In this MR, when group/project/merge_requests/iid/diffs?diff_head=true is visited, then the diff which is compared against HEAD will be shown

The functionality is put behind a feature flag until the frontend part is implemented

This is the first backend iteration for #27008 (closed)

Edited by Igor Drozdov

Merge request reports