Commit dialog: add convenience paste buttons for key words

c600g 2 weeks ago • updated 2 weeks ago 7

I regularly type "fixup! " and paste a copied hash into the commit window message box.

Since my hand is already on the mouse to click into the text box and paste the hash, it could easily click a "fixup!" button above the text box (to the right of the "Commit Message:" label) just before that and save the typing.

Just for curiosity: do you use the fixup! prefix to prepare amending a commit using interactive rebase?

I would not use a button - it's too heavyweight - but maybe an entry in the Select popup or the control+space popup?

Yes, fixup! to subsequently amend a prior commit that is not the latest commit using rebase.

I don't understand "Heavyweight".  A button with "fixup!" on it is visible, fast, easy, 1 click; most simple and elementary; yes, it is not UI sexy.

Usability-wise, Select popup is multiple steps (click menu and mouse to it, scroll if necessary).  Control+space is also multiple steps (key and mouse to it or key and multiple arrow key usage). Both are more clutzy than clicking a button.  If no button, then perhaps both of these so works from keyboard-in-textbox and mouse.

Whichever approach(es) implemented, when invoked, it should paste "fixup! " (with the space) and position cursor after it.

You already can select a previous commit message. What about prefixing it (optionally) with "Fixup! "?

Hmmm, I never used the "Select from Log..." before because I just don't need to reuse a prior commit's message.  I just tried that menu option for the first time and saw and tried the "Add fixup! prefix..." checkbox option.  Nice workflow if you know the correct commit to choose.

While that nicely adds fixup! to the chosen commit from the list, I usually don't know which one of a few commits to choose, so I have to look at the commits and their files and their diffs using the Commits, Files, and Changes views... which that window does not allow.

Ha, I've already implemented the option a few months ago! So I think we could mark this request as fixed.
You wrote to paste the commit ID, so you must already have searched for that commit before.

As I wrote, I cannot use the feature you "implemented the option a few months ago!" as it doesn't allow looking at commits files and diffs to find the correct commit.

To find the correct commit, I wrote that I use the "Commits, Files, and Changes views".  

The "Select from Log..." option currently offers no value to me.

I also use the Commit Message view a lot, composing most commits in it.  Perhaps a button or something on the hamburger menu or context menu?