Git looks at historical changes from n lines to m lines of code

  git, question

There are 5000 submissions in Git warehouse, each with the file name


Made changes.

Ps: chuxia ndi _ file can be translated as "emperor appears."

Among them, chuxiandi_file has a function named


Among them, xianshijing_function occupies 50-100 rows.
Of course, although it is impossible to modify the xianshijing_function in every submission, it has been modified in many commit.

PS: xianshijing_function can be translated as "earthly essence"

Then the question arises. Can git realize to only look at the changes of xianshijing_function in 5000 commit?

man git-log

It says:

−L <start>,<end>:<file>, −L :<funcname>:<file>

Trace the evolution of the line range given by “<start>, <end>” (or the function name regex <funcname>) within the <file>. You may not give any pathspec limiters. This is currently limited to a walk starting from a single revision, i.e., you may only give zero or one positive revision arguments. You can specify this option more than once.