I love the git log -L feature that allows tracking the history of a particular piece of code. However, this feature breaks down when that piece of code was moved, either within a file or between files. Is there a way to also track these moves?
It seems Git has some features to track code that was moved between files.
git blame has the "-C" option that reads "In addition to -M, detect lines moved or copied from other files that were modified in the same commit."
git log has the -S option that reads "Look for differences that change the number of occurrences of the specified string (i.e. addition/deletion) in a file. Intended for the scripter’s use."
Is there maybe a script that combines git log -S and git log -L to track changes in a piece of code across moves?