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

Re: [PATCH] git-rebase: Print name of rev when using shorthand

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2014, 17:01 UTC
Message-ID
<xmqqk3api4yy.fsf@gitster.dls.corp.google.com>
In-Reply-To
<CAN7MxmUikP6pVAj3cpDiSbFxawScTh5zKusPUe8SpkNbH=e6Aw@mail.gmail.com>
Brian Gesiak <modocache@gmail.com> writes:
Show 7 quoted lines
> Personally, I've been using the "-" shorthand with "git checkout"
> for a year or so, but only learned about "@{-1}" a few months ago.
> I think those who use "@{-1}" are familiar enough with the concept
> that they don't need to have the reference translated to a
> symbolic full name. Users familiar with "-" might not be aware of
> "@{-1}", however, so I'd prefer not to output it as we are
> currently.
I do not understand that reasoning.

The concept of "n-th prior checkout" (aka @{-n}) and "immediately previous checkout" (aka "-") are equivalent, even though the former may be more generic.

You seem to be saying that those who understand the former are with superiour mental capacity in general than those who only know the latter, and they can always remember where they came from. It sounds similar to an absurd claim (pulled out of thin-air only for illustration purposes) that French-speaking people are of superiour mind and do not need as much help with math as English speakers.

> Furthermore, were we to translate "@{-1}", does that mean we
> should also translate "@{-2}" or prior?

Surely, why not. If a user is so forgetful to need help remembering where s/he was immediately before, wouldn't it be more helpful to give "here is where you were" reminder for older ones to allow them to double check they specified the right thing and spot possible mistakes?

I can buy "that would be a lot more work, and I do not want to do it (or I do not think I can solve it in a more general way)", though.

Previous: Brian GesiakNext: Junio C Hamano
Message 4 of 6 in “git-rebase: Print name of rev when using shorthand”
  1. git-rebase: Print name of rev when using shorthandBrian Gesiak, Apr 13, 2014
  2. Junio C HamanoApr 14, 2014
  3. Brian GesiakApr 16, 2014
  4. Junio C HamanoApr 16, 2014
  5. Junio C HamanoApr 16, 2014
  6. Brian GesiakApr 16, 2014

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.