git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/2] sha1_name: fix error message for @{<N>}, @{<date>}
Date: Wed, 22 May 2013 16:39:54 -0400	[thread overview]
Message-ID: <CAPig+cQwcNxvvXZ_PFtUZ3HnH5tdpsL8RLQ02dTDz37y0XpJhg@mail.gmail.com> (raw)
In-Reply-To: <1369219195-20096-3-git-send-email-artagnon@gmail.com>

On Wed, May 22, 2013 at 6:39 AM, Ramkumar Ramachandra
<artagnon@gmail.com> wrote:
> Currently, when we try to resolve @{<N>} or @{<date>} 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 <artagnon@gmail.com>

  reply	other threads:[~2013-05-22 20:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-22 10:39 [PATCH v2 0/2] Fix invalid revision error messages Ramkumar Ramachandra
2013-05-22 10:39 ` [PATCH 1/2] sha1_name: fix error message for @{u} Ramkumar Ramachandra
2013-05-22 17:35   ` Junio C Hamano
2013-05-23 11:03     ` Ramkumar Ramachandra
2013-05-22 10:39 ` [PATCH 2/2] sha1_name: fix error message for @{<N>}, @{<date>} Ramkumar Ramachandra
2013-05-22 20:39   ` Eric Sunshine [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-05-24  7:42 [PATCH v3 0/2] Replacement for rr/die-on-missing-upstream Ramkumar Ramachandra
2013-05-24  7:42 ` [PATCH 2/2] sha1_name: fix error message for @{<N>}, @{<date>} Ramkumar Ramachandra
2013-05-24 16:52   ` Junio C Hamano
2013-05-24 17:24     ` Ramkumar Ramachandra
2013-05-24 17:46       ` Junio C Hamano
2013-05-24 17:50         ` Ramkumar Ramachandra
2013-05-21 10:41 [PATCH 0/2] Fix invalid revision error messages for 1.8.3 Ramkumar Ramachandra
2013-05-21 10:41 ` [PATCH 2/2] sha1_name: fix error message for @{<N>}, @{<date>} Ramkumar Ramachandra
2013-05-21 16:52   ` Junio C Hamano
2013-05-21 17:38     ` Kevin Bracey
2013-05-21 18:09     ` Ramkumar Ramachandra

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=CAPig+cQwcNxvvXZ_PFtUZ3HnH5tdpsL8RLQ02dTDz37y0XpJhg@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=artagnon@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).