Don't rebase if not needed in ee-specific-lines-check
What does this MR do?
- Don't rebase if not needed in ee-specific-lines-check
- Use
git checkout -f
to make sure it's clean - Rename
old_base
toce_fetch_base
(hope the name is not too confusing)
Are there points in the code the reviewer needs to double check?
I don't think this requires double checking, but I could see it's a bit hard to follow how this works. This one is particularly based on https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/5610 which we rebase based on the merge-base
between CE branch and CE master. The problem is that whenever both bases are the same, we shouldn't rebase because there's nothing needs to be done.
Why was this MR needed?
This should fix https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/68097296 mentioned in https://gitlab.com/gitlab-org/gitlab-ee/issues/5960#note_72977977
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug - Conform by the code review guidelines
-
Has been reviewed by a Backend maintainer
-
What are the relevant issue numbers?
Fixing parts of https://gitlab.com/gitlab-org/gitlab-ee/issues/5960