+1
Completed

Commit dialog: add convenience paste buttons for key words

Jeff Jensen 6 years ago updated by Thomas Singer 5 years ago 11

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.


GOOD, I'M SATISFIED

Great solutions for this, thank you.

Satisfaction mark by Jeff Jensen 5 years ago

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?

There may be a set of prefixes, not only one. And it's not ok to create a button for every prefix but it's ok to add some menu for this purpose.

Still regularly typing "fixup!".  Is there a reasonable feature to add to SG to enable clicking instead of typing?

19.1 previews have added functionality ("Use message for commit") that makes this request complete.  Thank you very much!  


+1
Completed

The prefix, e.g. "fixup! " can be configured with the low-level property log.useCommitMessage.prefix.