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

Re: [PATCH/TOY] Shortcuts to quickly refer to a commit name with keyboard

From
Duy Nguyen <pclouds@gmail.com>
Date
Jan 20, 2017, 11:01 UTC
Message-ID
<CACsJy8C0SFsTNTB=R8zLLvnqkPofP0VQWPUR9pguT-n2Y+Tp1w@mail.gmail.com>
In-Reply-To
<alpine.DEB.2.20.1701201138520.3469@virtualbox>

On Fri, Jan 20, 2017 at 5:46 PM, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:

Show 22 quoted lines
> Why not introduce a flag to "git log" that shows a keyboard-friendly name
> similar to what `git name-rev` would have said, except that the name would
> be generated using the name(s) specified on the command-line?
>
> Example:
>
>         git log 8923d2d0 upstream/pu
>
>         commit 8923d2d00192ceb1107078484cccf537cb51c1b5 (8923d2d0)
>         ...
>         commit 9f500d6cf5eaa49391d6deca85fc864e5bd23415 (8923d2d0^)
>         ...
>         commit f79c24a291a58845b08cfec7573e22cc153693e1 (8923d2d0~2)
>         ...
>         commit c921c5bb63baaa16dc760de9549da55c8c89dc9c (upstream/pu)
>         ...
>         commit 16793ba6b6333ba0cdee1adb53d979c3fbdb17bc (upstream/pu^)
>         ...
>
> Granted, this is still a little more cumbersome to type than @h1, but
> then, you can skip those round-robin games as well as the possibly
> backwards-incompatible extension of the rev syntax.

I mentioned name-rev a few paragraphs down. No, I want the sweet and short @h1 (or something like that). name-rev does not qualify. I don't feel comfortable typing 8923d2d0 without looking at the keyboard, and that's a lot of movement on the keyboard. upstream/pu is a bit better, but still very long (at least for me). Yes TAB-ing does help, but not enough. Then you'll get the dreadful "^2~1^3" dance.

-- 
Duy
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 12 in “Shortcuts to quickly refer to a commit name with keyboard”
  1. Shortcuts to quickly refer to a commit name with keyboardNguyễn Thái Ngọc Duy, Jan 20, 2017
  2. Johannes SchindelinJan 20, 2017
  3. Duy NguyenJan 20, 2017
  4. Johannes SchindelinJan 20, 2017
  5. Jeff KingJan 20, 2017
  6. Junio C HamanoJan 20, 2017
  7. Jacob KellerJan 20, 2017
  8. Jeff KingJan 20, 2017
  9. Duy NguyenJan 21, 2017
  10. Jeff KingJan 21, 2017
  11. Duy NguyenFeb 5, 2017
  12. Jacob KellerFeb 5, 2017

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.