It seems that --follow is --follow evaluated as a "buggy", but the git log should follow a rename to IDEA:
See " IDEA-66700 git log should follow renaming ( --follow ) ":
Closing: the request was fixed some time ago (but not through buggy -–follow ).
You will find more information in the " IDEA-89370 Git: Show History of a Renamed Folder by Lowering the History Before Renaming
We do not use --follow (due to its inappropriate nature): instead, we call git show -M in the last commit and check if the file has been renamed to this commit, in which case the request history for the old file name, etc. d.
Please note that (it is not necessary that this is here) an attempt to show the history of the renamed folder did not work:
Calling git log -- <dir> even with --follow does not correspond to renaming, which, however, is logical, since the log is filtered by the new directory name, and the old name does not match it.
That is, git itself does not provide rename directory history.
There are still problems for a certain type of file renaming:
" IDEA-89347 Git: Part of the file history is not displayed due to circular renaming of the file. "
git log --follow follows all of these renames perfectly. But, as we know, he does not show mergers. Therefore, we cannot use it.
Instead, our algorithm for extracting the entire file history should be improved.
We really need to look at each revision and see if the file was renamed there.
Of course, calling git show --name-status -M for each revision is very expensive.
Here is the solution: call git log --name-status and look at these changes to the file where it is added (renames are not displayed by git log , even with " -M ", because we restrict it to the available file path).