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

How pretty is pretty? git cat-file -p inconsistency

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Oct 7, 2011, 08:44 UTC
Message-ID
<4E8EBC00.90909@drmicha.warpmail.net>

diff <(git cat-file -p tags/v1.7.7) <(git cat-file tag tags/v1.7.7) 4c4 < tagger Junio C Hamano <gitster@pobox.com> Fri Sep 30 14:21:06 2011 -0700 ---

> tagger Junio C Hamano <gitster@pobox.com> 1317417666 -0700
vs.
diff <(git cat-file -p tags/v1.7.7^{}) <(git cat-file commit tags/v1.7.7^{})
(no diff)

That is, "cat file -p" pretty prints dates for tag objects but not for commit objects. In fact, "-p" on commit objects does not prettify at all compared to the raw content. Is that intentional? I'd suggest prettifying dates with "-p" for commit objects also. But just how plumbing is the "-p" mode of "cat-file"?

Michael
Next: Junio C Hamano
Message 1 of 6 in “How pretty is pretty? git cat-file -p inconsistency”
  1. Michael J GruberOct 7, 2011
  2. Junio C HamanoOct 7, 2011
  3. Michael J GruberOct 7, 2011
  4. Jakub NarebskiOct 7, 2011
  5. Michael J GruberOct 8, 2011
  6. Jakub NarebskiOct 8, 2011

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.