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

[BUG] "echo HEAD | git cat-file --batch=''" fails catastrophically

From
Samuel Bronson <naesten@gmail.com>
Date
Dec 11, 2013, 04:37 UTC
Message-ID
<CAJYzjmdHdLZaBijahepOQDJtDd_TdojT4ivNxGrcerRfEuHQEg@mail.gmail.com>
Observe:
% echo HEAD | git cat-file --batch=
fatal: object fde075cb72fc0773d8e8ca93d55a35d77bb6688b changed type!?

Without the =, it works fine; with a string that has both "%(objecttype)" and "%(objectsize)", it's fine; but when you don't include both, it complains about one of the values that you did not mention having changed.

jrnieder fingered v1.8.4-rc0~7^2~15 as the (likely?) culprit here.
Next: Jeff King
Message 1 of 11 in “[BUG] "echo HEAD | git cat-file --batch=''" fails catastrophically”
  1. Samuel BronsonDec 11, 2013
  2. Jeff KingDec 11, 2013
  3. 1/2 cat-file: pass expand_data to print_object_or_dieJeff King, Dec 11, 2013
  4. Jonathan NiederDec 11, 2013
  5. Jeff KingDec 11, 2013
  6. Junio C HamanoDec 12, 2013
  7. 2/2 cat-file: handle --batch format with missing type/sizeJeff King, Dec 11, 2013
  8. Jonathan NiederDec 11, 2013
  9. Jeff KingDec 11, 2013
  10. Jonathan NiederDec 11, 2013
  11. Junio C HamanoDec 12, 2013

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.