Do not reset merge request approvals when doing a rebase

Problem

One of our customer (internal) has the following workflow in their MR to make sure that their branch contains the latest change from the default branch:

git pull
git checkout master
git pull
git checkout <source branch>
git merge master

When doing the workflow, there are times where the merge request approvals are reset and there are times when merge request approvals are not reset.

As per @phikai this is intended as:

Approval resets are controlled by a git feature called patch-id. https://www.git-scm.com/docs/git-patch-id/2.1.4#:~:text=DESCRIPTION,to%20be%20the%20same%20thing. So depending on what changes when they merge master in, it could move the hunks enough that it looks different enough and so the patch-id is different.

Proposal

Investigate if it's possible to base approval resets so that it would depend on a more reliable backend (not really sure if there is something in git that can be used).