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

Re: How do I get the file contents from an arbitrary revision to stdout?

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 8, 2021, 21:54 UTC
Message-ID
<xmqqtuhri3mc.fsf@gitster.g>
In-Reply-To
<YWCj6NqMrxksN1V8@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
>   git cat-file -p bar-branch:foo.c
>
> (the "-p" is "pretty-print based on the object's type", so the two are
> equivalent).

IIRC, "cat-file -p" doesn't do textconv, but "show" would, and depending on the use case the difference may matter.

Previous: Jeff KingNext: Jeff King
Message 5 of 6 in “How do I get the file contents from an arbitrary revision to stdout?”
  1. Alan MackenzieOct 8, 2021
  2. Konstantin RyabitsevOct 8, 2021
  3. Alan MackenzieOct 8, 2021
  4. Jeff KingOct 8, 2021
  5. Junio C HamanoOct 8, 2021
  6. Jeff KingOct 8, 2021

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.