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

Looking up objects that point to other objects

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 26, 2011, 19:01 UTC
Message-ID
<CACBZZX6sydEmuwj_C-KNocjra=6ynud5KFoezPd_Rr3bN4wh2w@mail.gmail.com>

Here's a couple of tasks that require brute-force with the Git object format that I've wanted to do at some point.

 * Associate a blob with trees
   Given a blob sha1 find trees that reference it.
 * Associate trees with commits / other trees.
   Given a tree find which commit points to that tree, or a parent
   tree N levels up the stack that a commit points to.

Has anyone written tools to do this? They'd obviously be very CPU and I/O intensive, but occasionally I encounter cases where I'd find this useful, e.g. to find what commit contains this huge blob, or what trees / commits are involved with a corrupted object.

Next: Jeff King
Message 1 of 2 in “Looking up objects that point to other objects”
  1. Ævar Arnfjörð BjarmasonAug 26, 2011
  2. Jeff KingAug 26, 2011

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.