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

Re: [RFC/PATCH] Add a new commit-raw command.

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 24, 2009, 22:17 UTC
Message-ID
<94a0d4530902241417ld391492h2f76e325ef20a125@mail.gmail.com>
In-Reply-To
<20090224221406.GA6299@coredump.intra.peff.net>
On Wed, Feb 25, 2009 at 12:14 AM, Jeff King <peff@peff.net> wrote:
Show 12 quoted lines
> On Tue, Feb 24, 2009 at 11:28:34PM +0200, Felipe Contreras wrote:
>
>> This command receives as input a raw commit object, and outputs the
>> generated sha1. This is very useful when doing some serious repo
>> reconstructions.
>>
>> For example: git cat-file -p 343ee25 | git write-raw
>> 343ee2589d1b94772f513cc699765622351acb19
>
> How about:
>
>  git cat-file -p 343ee25 | git hash-object -t commit --stdin
Duh! Thanks :)
I knew there must have been something for that use-case.
-- 
Felipe Contreras
Previous: Jeff KingNext: Shawn O. Pearce
Message 3 of 4 in “Add a new commit-raw command.”
  1. Add a new commit-raw command.Felipe Contreras, Feb 24, 2009
  2. Jeff KingFeb 24, 2009
  3. Felipe ContrerasFeb 24, 2009
  4. Shawn O. PearceFeb 24, 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.