Supposing to have a file (and its path) path/to/file
in a specific version committed in a commit with a specific sha that we call hex_sha
.
After the use of git blame file/to/path hex_sha
I get each row modified in that revision.
For this example we assume to check the line with number line_i
Supposing to have another prior date date_limit
.
How can I use git log
to get how many times (or a list of commits) the line line_i
in the file path/to/file
has been modified from the revision with sha hex_sha
to a specific date date_limit
?
I tried:
git log --since=date_limit origin..hex_sha -- -Lline_i,+1:path/to/file
and other different arrangements of this command but nothing happens or git badly understand the file name. I have the impression that after --
while a target revision is present, git take the first argument after --
as file path. I'm sure that the date_limit is prior to the commit in exam.