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

Git tree/blob and corresponding commit

From
Pascal Obry <pascal@obry.net>
Date
Aug 10, 2008, 17:08 UTC
Message-ID
<489F208B.2070006@obry.net>

Something I'm trying to figure out and can't find the answer myself. I'm browsing a tree, for example:

    $ git ls-tree HEAD~100

This list a set of files with the corresponding blob. Each blob has it's own SHA1. Fine.

Now given a SHA1 I'd like to know which commit has created (was containing) this specific blob?

What is the best way to achieve that?
Thanks.
-- 
--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
Next: Jonathan Nieder
Message 1 of 5 in “Git tree/blob and corresponding commit”
  1. Pascal ObryAug 10, 2008
  2. Jonathan NiederAug 10, 2008
  3. Jonathan NiederAug 10, 2008
  4. Pascal ObryAug 14, 2008
  5. Bryan DonlanAug 15, 2008

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.