Find commit that referenced a blob first
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Jul 19, 2018, 21:02 UTC
- Message-ID
- <C00CED1F-D685-40E5-A5CC-4040BFD82886@gmail.com>
Hi,
I have a blob hash and I would like to know what commit referenced this blob first in a given Git repo.
I could iterate through all commits sorted by date (or generation number) and then recursively search in the referenced trees until I find my blob. I wonder, is this the most efficient way to solve my problem? Is there some trick/existing Git command that would perform this search more efficiently for large repos?
Thank you, Lars