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

Re: [PATCH] branch: delete now accepts '-' as branch name

From
EAErlend Aasland <erlend-a@innova.no>
Date
Feb 22, 2022, 11:05 UTC
Message-ID
<EA5CFD34-9BFF-4030-9188-37953D947437@innova.no>
In-Reply-To
<220221.86zgmk9g68.gmgdl@evledraar.gmail.com>
Show 12 quoted lines
> On 21 Feb 2022, at 20:20, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
> 
> On Mon, Feb 21 2022, Junio C Hamano wrote:
> 
>> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>> 
>>>> Continuing the "thinking aloud" a bit, I _think_ this tells us these
>>>> things:
>>>> 
>>>> * @{-1} has way too many letters to type to be liked by users, who
>>>>   won't learn or remember what they do not appreciate (and do not
>>>>   blame them---it is a bad notation).
+1
>>>> * @{-<n>} may have been a generalized way that satisfied geeky mind
>>>>   while being implemented, but the users only need the "last one"
>>>>   and no such generalization.
That harmonises with my usage.
> FWIW I often use @{-2}, @{-3} or equivalent, but never @{-28} or
> whatever.

Ditto; I mostly (at least 95% of the time) only use @{-1}. I've used other small indices sporadically, but never a two-digit index.

> I think we should be careful to squat on namespaces needlessly, but if
> we can't think of a reason for why we wouldn't make typing some of these
> shortcuts easier...
IMO, it's not a shortcut if it's a hassle to type ;)
IIRC, the GitHub "Git Highlights" Blog has promoted the '-' trick every now and then.
> I haven't hacked it up (and won't any time soon), Erlend: are you interested? :)

There's a lot of suggestions floating around now, but sure, I'd be happy to give one of them a go; at least as a proof-of-concept :)

Erlend
Previous: Ævar Arnfjörð Bjarmason
Message 11 of 11 in “branch: delete now accepts '-' as branch name”
  1. branch: delete now accepts '-' as branch nameErlend Egeberg Aasland via GitGitGadget, Feb 16, 2022
  2. Junio C HamanoFeb 16, 2022
  3. Eric SunshineFeb 16, 2022
  4. Junio C HamanoFeb 16, 2022
  5. Erlend AaslandFeb 16, 2022
  6. Eric SunshineFeb 17, 2022
  7. Junio C HamanoFeb 17, 2022
  8. Ævar Arnfjörð BjarmasonFeb 21, 2022
  9. Junio C HamanoFeb 21, 2022
  10. Ævar Arnfjörð BjarmasonFeb 21, 2022
  11. Erlend AaslandFeb 22, 2022

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.