Make Git history follow renames again by performing the --skip in Ruby
What does this MR do?
It fixes an issue with git log
when --follow
and --skip
are given at the same time. The issue is described here: https://gitlab.com/gitlab-org/gitlab-ce/issues/23062#note_17757657
This was temporarily "fixed" by disabling --follow
(https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2210) but the downside is that the file history doesn't include renames in GitLab anymore.
I've fixed that by doing the --skip
in Ruby when follow
, path
and offset
are present:
- We add
offset
to--limit
- We don't pass
--skip
to the actualgit
command call - With the first
offset
of the returned commits
Are there points in the code the reviewer needs to double check?
Am I overlooking something with how --skip
/ --follow
is working? Am I breaking anything by fixing this use-case?
Screenshots (if relevant)
Before | After |
---|---|
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #23062 (closed) /cc @stanhu @chriscool