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

Re: git diff HEAD^(255) fails

From
Kevin Daudt <me@ikke.info>
Date
Feb 23, 2016, 20:58 UTC
Message-ID
<20160223205807.GA15324@ikke.info>
In-Reply-To
<CA+4vN7w2=JWusWDhhGNzAkJbE-s44G4WoXdvf26yzvtYfpktfQ@mail.gmail.com>
On Sat, Feb 06, 2016 at 10:56:46PM +0100, Ole Tange wrote:
Show 13 quoted lines
> 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.
> 
Is there a reason you are repeating 255 "^" instead of using HEAD~255?
Previous: Junio C Hamano
Message 6 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.