git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: ident hash usage question

From
Alex Riesen <raa.lkml@gmail.com>
Date
Oct 21, 2009, 06:25 UTC
Message-ID
<81b0412b0910202325i7a2f440bxcc9ce3ab9b684b2c@mail.gmail.com>
In-Reply-To
<76c5b8580910201519s29b939f3o3f6af8ca50340db1@mail.gmail.com>
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>
Previous: Eugene SajineNext: Eugene Sajine
Message 17 of 18 in “ident hash usage question”
  1. Eugene SajineOct 20, 2009
  2. Alex RiesenOct 20, 2009
  3. Alex RiesenOct 20, 2009
  4. Eugene SajineOct 20, 2009
  5. Alex RiesenOct 20, 2009
  6. Johannes SixtOct 20, 2009
  7. Alex RiesenOct 20, 2009
  8. Eugene SajineOct 20, 2009
  9. Junio C HamanoOct 20, 2009
  10. Eugene SajineOct 20, 2009
  11. Junio C HamanoOct 20, 2009
  12. Eugene SajineOct 20, 2009
  13. Daniel BarkalowOct 21, 2009
  14. Nanako ShiraishiOct 21, 2009
  15. Alex RiesenOct 20, 2009
  16. Eugene SajineOct 20, 2009
  17. Alex RiesenOct 21, 2009
  18. Eugene SajineOct 21, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.