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

Re: List all SHA1 hashes in repo

From
PHPeter Harris <git@peter.is-a-geek.org>
Date
Mar 23, 2008, 13:40 UTC
Message-ID
<eaa105840803230640j11ffa096x511a81b1c0b8f40e@mail.gmail.com>
In-Reply-To
<c6c947f60803230617if9606baxea21fa99dc3df37c@mail.gmail.com>
On Sun, Mar 23, 2008 at 9:17 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
>  To help testing little Git-related tool I'm writing, I need a lot of
>  pregenerated SHA1 hashes. Git repo seems to be a perfect source of
>  such. Is there an easy way to extract a list of all (well, most of)
>  SHA1 hashes in the repo?

After a "git gc" to roll everything into a single pack, you could do a "git verify-pack -v" to list all the SHA1s in the pack.

Peter Harris
Previous: Alexander GladyshNext: Johannes Schindelin
Message 2 of 8 in “List all SHA1 hashes in repo”
  1. Alexander GladyshMar 23, 2008
  2. Peter HarrisMar 23, 2008
  3. Johannes SchindelinMar 23, 2008
  4. Pieter de BieMar 23, 2008
  5. Johannes SchindelinMar 23, 2008
  6. Alexander GladyshMar 23, 2008
  7. Junio C HamanoMar 23, 2008
  8. Johannes SchindelinMar 23, 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.