Option to use the --follow flag for history with git log
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=361047)
</details>
<!--IssueSummary end-->
<!-- This template is a great use for issues that are feature::additions or technical tasks for larger issues.-->
Hi,
So according to GitLab support request #271443 there are issues with the `git log --follow`, where commits are missed and it is 10~ times slower in some instances.
### Proposal
In order to circumvent this I think it should be possible to choose to use history with or without the `--follow` flag.
Currently, we use `--follow` when a single path is passed as a param: https://gitlab.com/gitlab-org/gitlab/blob/53bbdae441392490ef2ffce23d23b3ff43c7da10/app/models/repository.rb#L150. The proposal it to be able to switch the usage in order to have a performance gain in some cases.
<!-- Use this section to explain the feature and how it will work. It can be helpful to add technical details, design proposals, and links to related epics or issues. -->
<!-- Consider adding related issues and epics to this issue. You can also reference the Feature Proposal Template (https://gitlab.com/gitlab-org/gitlab/-/blob/master/.gitlab/issue_templates/Feature%20proposal%20-%20detailed.md) for additional details to consider adding to this issue. Additionally, as a data oriented organization, when your feature exits planning breakdown, consider adding the `What does success look like, and how can we measure that?` section.
-->
<!-- Label reminders
Use the following resources to find the appropriate labels:
- https://gitlab.com/gitlab-org/gitlab/-/labels
- https://about.gitlab.com/handbook/product/categories/features/
-->
issue