search

Home  >  Q&A  >  body text

Git View code history changes from n to m lines

There are 5000 submissions in the Git warehouse, and each submission has a file name

  chuxiandi_file

Modified.

  PS:chuxiandi_file 可以翻译成“出现帝”。

Among them, there is a function named

in chuxiandi_file
  xianshijing_function

Among them, xianshijing_function occupies 50 lines--100 lines.
Of course, although xianshijing_function cannot be modified in every commit, it has indeed been modified in many commits.

  PS: xianshijing_function 可以翻译成“现世精”

Then the question is, can git only check the changes of xianshijing_function in 5000 commits?

滿天的星座滿天的星座2886 days ago594

reply all(1)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-02 09:48:42

    man git-log

    里边有写:

    −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.

    reply
    0
  • Cancelreply