From: Eric Sunshine Date: Wed, 22 May 2013 20:39:54 GMT Subject: Re: [PATCH 2/2] sha1_name: fix error message for @{}, @{} Message-ID: In-Reply-To: <1369219195-20096-3-git-send-email-artagnon@gmail.com> On Wed, May 22, 2013 at 6:39 AM, Ramkumar Ramachandra wrote: > Currently, when we try to resolve @{} or @{} when the reflog > doesn't go back far enough, we get errors like: > > # on branch master > $ git show @{10000} > fatal: Log for '' only has 7 entries. > > $ git show @{10000.days.ago} > warning: Log for '' only goes back to Tue, 21 May 2013 14:14:45 +0530. > ... > > # detached HEAD case > $ git show @{10000} > fatal: Log for '' only has 2005 entries. > > $ git show master@{10000} > fatal: Log for 'master' only has 7 entries. > > The empty string '' is ugly, inconsistent, and failing to convey s/failing/fails/ > information about whose logs we are inspecting. Change this so that we > get: > > # on branch master > $ git show @{10000} > fatal: Log for 'master' only has 7 entries. > > $ git show @{10000.days.ago} > warning: Log for 'master' only goes back to Tue, 21 May 2013 14:14:45 +0530. > ... > > # detached HEAD case > $ git show @{10000} > fatal: Log for 'HEAD' only has 2005 entries. > > $ git show master@{10000} > fatal: Log for 'master' only has 7 entries. > > Simple, consistent, and informative; suitable for output even from > plumbing commands like rev-parse. > > Signed-off-by: Ramkumar Ramachandra