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

Re: [RFC] git cat-file "literally" option

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2015, 15:47 UTC
Message-ID
<CAPc5daUWTRA=cziUsXEbwNrggA_3mhRsrfnVaQ-F7iEeSO7ATw@mail.gmail.com>
In-Reply-To
<CACsJy8BJnHTyXhhJaCuZAzjm=Gd96EjANEw76j=3L92cmbX7HA@mail.gmail.com>
On Wed, Feb 18, 2015 at 5:58 AM, Duy Nguyen <pclouds@gmail.com> wrote:
> ... skip the enum object_type conversion. You probably need special
> treatment for packed objects too.

I do not think you can store object of type "bogus" in a pack data stream to begin with, so I wouldn't worry about packed objects.

"cat-file --literally" that does not take "-t" would not be useful, as the output "cat-file <type> <object>" does not tell what <type> the thing is. Other things like sizes and existence can be inferred once you have an interface to do "cat-file <type> <object>", so in that sense -e and -s are not essential (this also applies to "cat-file" without --literally).

By definition, "--literally -p" would not be able to do anything fancier than just dump the bytes (i.e. what "cat-file <type> <object>" does), as the bogus type is not something the code would know the best external representation for.

Previous: Duy NguyenNext: karthik nayak
Message 4 of 5 in “[RFC] git cat-file "literally" option”
  1. karthik nayakFeb 18, 2015
  2. karthik nayakFeb 18, 2015
  3. Duy NguyenFeb 18, 2015
  4. Junio C HamanoFeb 18, 2015
  5. karthik nayakFeb 19, 2015

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.