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

Re: git command to read

From
Alexander Gavrilov <angavrilov@gmail.com>
Date
Oct 21, 2008, 12:06 UTC
Message-ID
<bb6f213e0810210506u51cb83d4p718b793b3e9f7fca@mail.gmail.com>
In-Reply-To
<18685.49368.557513.727997@cargo.ozlabs.ibm.com>
On Tue, Oct 21, 2008 at 3:45 PM, Paul Mackerras <paulus@samba.org> wrote:
Show 19 quoted lines
> Jeff King writes:
>
>> On Tue, Oct 21, 2008 at 10:21:09PM +1100, Paul Mackerras wrote:
>>
>> > Is there a command in git at the moment that will read commit IDs on
>> > standard input and print the contents of each commit on standard
>> > output (without waiting for EOF on stdin)?
>>
>> How about:
>>
>>   git cat-file --batch
>>
>> ?
>>
>> Unfortunately it just dumps the raw commit information instead of
>> allowing the usual formatting, but perhaps that is sufficient (you asked
>> for "contents").
>
> Ah, thank you, that looks like just what I want. :)

Since cat-file does not perform any encoding conversion, you'll have to process the encoding headers manually though.

Alexander
Previous: Paul Mackerras
Message 4 of 4 in “git command to read”
  1. Paul MackerrasOct 21, 2008
  2. Jeff KingOct 21, 2008
  3. Paul MackerrasOct 21, 2008
  4. Alexander GavrilovOct 21, 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.