git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Daudt <me@ikke.info>
To: Ole Tange <ole@tange.dk>
Cc: git@vger.kernel.org
Subject: Re: git diff HEAD^(255) fails
Date: Tue, 23 Feb 2016 21:58:07 +0100	[thread overview]
Message-ID: <20160223205807.GA15324@ikke.info> (raw)
In-Reply-To: <CA+4vN7w2=JWusWDhhGNzAkJbE-s44G4WoXdvf26yzvtYfpktfQ@mail.gmail.com>

On Sat, Feb 06, 2016 at 10:56:46PM +0100, Ole Tange wrote:
> 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?

      parent reply	other threads:[~2016-02-23 20:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-06 21:56 git diff HEAD^(255) fails Ole Tange
2016-02-06 23:23 ` [PATCH] setup.c: make check_filename() return 0 on ENAMETOOLONG Nguyễn Thái Ngọc Duy
2016-02-07 12:23   ` Johannes Schindelin
2016-02-08  5:16     ` [PATCH] Avoid interpreting too-long parameter as file name Nguyễn Thái Ngọc Duy
2016-02-08 20:46       ` Junio C Hamano
2016-02-23 20:58 ` Kevin Daudt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160223205807.GA15324@ikke.info \
    --to=me@ikke.info \
    --cc=git@lists.ikke.info \
    --cc=git@vger.kernel.org \
    --cc=ole@tange.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).