From: Kevin Daudt Date: Tue, 23 Feb 2016 20:58:07 GMT Subject: Re: git diff HEAD^(255) fails Message-ID: <20160223205807.GA15324@ikke.info> In-Reply-To: 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?