I have a full repo, with all commit history, repo
I also have a snapshot of the repo, made sometime in the past. Let's call it snapshot
. The snapshot is based on the version of the repo as taken in the past, with some additions/changes.
If I check the differences:
$ diff -wqr repo/ snapshot/ | grep -c differ
538
$ diff -wqr repo/ snapshot/ | grep -cv differ
9
So, I am positive that not that many changes have been made to the master repo: I am simply looking at the wrong repo commit. But which one is the commit were the snapshot was taken?
There are so many differences that I do not know where to start. I know nothing about the repo, so I am clueless of when the snapshot was taken. There is no date information which can point me to a certain period, no VERSION
file, nothing ...
What comes to my mind is to take one of the files in the snapshot which differ from the repo, and run a command to see in which commit that file appears verbatim. With some luck, I will get something like:
$ list-commits.sh snapshot/xxx/my-file.py repo
File snapshot/xxx/my-file.py appears verbatim in following commits:
b77ee66
74f6d4f
...
(It could also be that I am by chance chosing one of the files that really changed in the snapshot: in that case I will get no commit list, and I will try another file)
This would limit the commits that I need to investigate. Is there a method of doing this with plain git commands?