Re: ident hash usage question
On Wed, Oct 21, 2009 at 00:19, Eugene Sajine <euguess@gmail.com> wrote:
Show 14 quoted lines
>>> How is that? It seams to me that git log <path> will show only commits
>>> where <path> was changed/committed? Considering the fact that I've got
>>> the initial path from the blob, i should get the exact commit history
>>> (or last commit in my example) for the file(s) (Files if renaming
>>> occurred without content change).
>>
>> The blob is present in each commit since it was introduced. Except
>> when your project contains only that one blob, isn't the state of
>> the other parts of an interest?
>>
> I would question this statement. It seems to me that hash of the file
> content is logged only for the commit when it was touched.
> Therefore there is very limited amount of actual commits where the
> same hash can be met.
git rev-list HEAD | while read sha; do git ls-tree $sha; done | grep <blob-sha>