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

Re: feature request, git-gui: add hotkey to toggle amend/new

From
DDavid <bouncingcats@gmail.com>
Date
Sep 3, 2019, 01:01 UTC
Message-ID
<CAMPXz=pUWNVkM78UHm4NpFZ_nJQOa0ba07N3gMKFzWUiindZ1Q@mail.gmail.com>
In-Reply-To
<CAKPyHN3Zvf6gtKAq03s8AsguaOFG=g2huGRCTWmBVWioDBqFWw@mail.gmail.com>
On Tue, 3 Sep 2019 at 04:11, Bert Wesarg <bert.wesarg@googlemail.com> wrote:
> On Mon, Sep 2, 2019 at 6:25 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:
> > On Sat, Aug 31, 2019 at 12:51 PM Birger Skogeng Pedersen <birger.sp@gmail.com> wrote:
> > > In my pursuit to fully utilize git-gui with only using a keyboard, I
> > > suggest that there is a hotkey to toggle between selecting "New
> > > Commit" and "Amend Last Commit".

Hi, thanks for maintaining and contributing to git and git-gui, it's a great tool!

> After focusing the commit message widget, you can focus the radio
> buttons with Tab/Shift+Tab and press Space.
> I think this is short enough, so that wasting a Letter is not
> justified here.

Ugh, may I express how unhappy I am to read that opinion from the maintainer. I strongly disagree, please reconsider :(

And I enthusiastically support this initial request for a single hotkey to immediately toggle between "New Commit" and "Amend Last Commit". And it should work regardless of wherever the cursor or highlight is currently active.

I have used git-gui for many years and I find this is actually the most annoying and inconsistent aspect of its user interface. Sometimes if one is lucky then "spacebar" will achieve it at startup or after refresh, sometimes not. When I test here just now the suggested tab/shift-tab/spacebar method, it does toggle but it also changes the items in the staged changes list as an unwanted side effect. My version says 0.20.0.8.gd000, but I have a few local patches (written years ago) so sorry I am not testing with a version that you have, but even so I wanted to report what I observed.

If one is often amending commit messages as I do during large interactive rebases, it is painful to have to do some kind of context-sensitive multi-key dance just to change from "New Commit" to "Amend Last Commit". Especially when every other operation has become a single keystroke in my muscle memory.

In my world it most definitely would not be "wasting a letter" to implement this! It would instead be "OMG at last that got fixed for everyone, hooray!" :D

Previous: Pratyush YadavNext: Bert Wesarg
Message 26 of 27 in “feature request, git-gui: add hotkey to toggle amend/new”
  1. Birger Skogeng PedersenAug 31, 2019
  2. Birger Skogeng PedersenSep 2, 2019
  3. Bert WesargSep 2, 2019
  4. Birger Skogeng PedersenSep 2, 2019
  5. Add hotkey to toggle "Amend Last Commit" radio selectorBirger Skogeng Pedersen, Sep 2, 2019
  6. Bert WesargSep 3, 2019
  7. Bert WesargSep 3, 2019
  8. Bert WesargSep 3, 2019
  9. Bert WesargSep 2, 2019
  10. Bert WesargSep 2, 2019
  11. Birger Skogeng PedersenSep 3, 2019
  12. Pratyush YadavSep 3, 2019
  13. Birger Skogeng PedersenSep 3, 2019
  14. Pratyush YadavSep 3, 2019
  15. DavidSep 3, 2019
  16. Pratyush YadavSep 3, 2019
  17. Johannes SixtSep 4, 2019
  18. Pratyush YadavSep 4, 2019
  19. Birger Skogeng PedersenSep 4, 2019
  20. Johannes SixtSep 4, 2019
  21. Bert WesargSep 4, 2019
  22. David AguilarSep 10, 2019
  23. Birger Skogeng PedersenSep 11, 2019
  24. Pratyush YadavSep 11, 2019
  25. Pratyush YadavSep 11, 2019
  26. DavidSep 3, 2019
  27. Bert WesargSep 3, 2019

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.