You can try a
git log --follow -L1,1:B.java
(The -L
option of git log
is from git1.8.4 and is illustrated here)
You can also use git blame
, as suggested in this answer, except you would need to add the -C10
option to detect moves between files.
('10
' because the default bound for number of alphanumeric characters that Git must detect as moving/copying between files for it to associate those lines with the parent commit is 40. And if 'statements_1
' is actually 'statements_1
', it would be too small to be detected).
git rblame -M -n -L1,1 -C B.java