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

git diff HEAD^(255) fails

From
OTOle Tange <ole@tange.dk>
Date
Feb 6, 2016, 21:56 UTC
Message-ID
<CA+4vN7w2=JWusWDhhGNzAkJbE-s44G4WoXdvf26yzvtYfpktfQ@mail.gmail.com>

git diff first looks for a file, then looks if it is a reference to a revision. If the file fails due to being too long, the diff fails:

$ git init $ git diff 'HEAD^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^' HEAD fatal: failed to stat 'HEAD^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^': File name too long

If file name too long it should just try to see if it is a reference to a revision.

/Ole
Next: Nguyễn Thái Ngọc Duy
Message 1 of 6 in “git diff HEAD^(255) fails”
  1. Ole TangeFeb 6, 2016
  2. setup.c: make check_filename() return 0 on ENAMETOOLONGNguyễn Thái Ngọc Duy, Feb 6, 2016
  3. Johannes SchindelinFeb 7, 2016
  4. Avoid interpreting too-long parameter as file nameNguyễn Thái Ngọc Duy, Feb 8, 2016
  5. Junio C HamanoFeb 8, 2016
  6. Kevin DaudtFeb 23, 2016

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.