Johannes Schindelin [off-list ref] writes:
On Fri, 2 Mar 2007, Jakub Narebski wrote:
quoted
Second, there were some work on git mailing list to create git command
which given a blob (or sha1 of a blob object) would list all commits (in
date order) which have this exact version of a file (of a blob).
It was shot down, and rightly so.
I think this "rightly" needs a clarification (otherwise Jakub
wouldn't have said the above).
It wasn't that identifying the commit that contained the version
of the file was not needed. It is just there already is a way
to do so, and "to create git command" turns out to be
unnecessary. Something like:
$ hash=`git hash-object --stdin <$file_in_question`
$ git log -z --raw -r --abbrev=40 |
grep -z '^:[0-7][0-7]* [0-7][0-7]* [0-9a-f][0-9a-f]* '"$hash"'