[go: up one dir, main page]

Skip to content

Merge request diff showing incorrect changes

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Problem to solve

A merge request adding a new file and deleting a previously existing one is causing GitLab to render the diff as if the old file has been modified to be the new one.

Further details

One of our repositories had a LICENSE file that was deleted and a new file Licenses.scan.js that was added. The file paths are src/packages/graphql-monitoring/LICENSE and src/packages/monorepo-scanner/src/scans/Licenses.scan.js.

The MR diff shows a single change which is changing the Licenses.scan.js, from the content of LICENSE to the current content of Licenses.scan.js, which is in fact a new file.

The issue can be reproduced in GitLab.com

Proposal

What does success look like, and how can we measure that?

The diff should show the old file src/packages/graphql-monitoring/LICENSE being removed and the new one, src/packages/monorepo-scanner/src/scans/Licenses.scan.js being added.

Links / references

alexviscreanu/test-wrong-diff!1

Edited by 🤖 GitLab Bot 🤖