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

Re: [PATCH 2/2] sha1_name: fix error message for @{<N>}, @{<date>}

From
Junio C Hamano <gitster@pobox.com>
Date
May 24, 2013, 17:46 UTC
Message-ID
<7vsj1c9spm.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CALkWK0moMOBUZqqSe521qfa7q8xe0Z5sN10ZRQpPaTu8EuxuDw@mail.gmail.com>
Ramkumar Ramachandra <artagnon@gmail.com> writes:
Show 23 quoted lines
> Junio C Hamano wrote:
>> What is this meant to update?  I recall rewriting this part on
>> purpose.
>
> I was being verbose to show that I handle the detached HEAD case too,
> which I missed last time.
>
>> Even though it appears unusual and invites confusion, it is very
>> consistent to say '' when the user asks for @... as we say 'master'
>> when the user asks for master@...; "inconsistent" is a very bad
>> label for it.
>
> The inconsistency refers to these two:
>
>>>   # on branch master
>>>   $ git show @{10000}
>>>   fatal: Log for '' only has 7 entries.
>
>>>   # detached HEAD case
>>>   $ git show @{10000}
>>>   fatal: Log for '' only has 2005 entries.
>
> Is the commit message unclear?
Very unclear.  You said
    The empty string '' is ugly, inconsistent, and fails to convey
    information...

I was reacting to "inconsistent" by pointing out that showing an empty string is very consistent.

I was _not_ saying that "'' must be kept because it is consistent", of course; that is a consistency that is not useful. Which means inconsistency that does not exist is a reason to rewrite it, nor the rewrite is to gain consistency. It is to make the result more useful.

That is why I rewrote it like so:
    The empty string '' is confusing and does not convey information
    about whose logs we are inspecting.  Change this so that...
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 6 of 7 in “Replacement for rr/die-on-missing-upstream”
  1. 0/2 Replacement for rr/die-on-missing-upstreamRamkumar Ramachandra, May 24, 2013
  2. 1/2 sha1_name: fix error message for @{u}Ramkumar Ramachandra, May 24, 2013
  3. 2/2 sha1_name: fix error message for @{<N>}, @{<date>}Ramkumar Ramachandra, May 24, 2013
  4. Junio C HamanoMay 24, 2013
  5. Ramkumar RamachandraMay 24, 2013
  6. Junio C HamanoMay 24, 2013
  7. Ramkumar RamachandraMay 24, 2013

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.