Suppose I have a file mocky.cpp
, I would like to list commits that modified the file, and also list another files that were touched by these commits.
So I try the following:
git log --name-only -- mocky.cpp
I get a list of commits, that is nice, strangely, however, all the commits do not modify a file except from mocky.cpp
. I check one of them, say, e013aac, w/ git show e013aac
and I find out it also changes testy.hpp
.
Moreover, I found that git show e013aac -- mocky.cpp
only outputs the diff for the mocky.cpp
but not for the testy.cpp
This is most counter-intuitive to me, anyway, how could I achieve what I wanted in the first place?