Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Make it easier to copy the commit SHA and subject #2270
Description of the Change
This adds 'Copy Commit SHA' and 'Copy Commit Subject' to the right-click
This was suggested in #1453
I started solving #1533 instead- I often create 'fixup' and 'squash' commits a lot to be used with auto-squashing. I decided that this could be too niche a use case because auto-squashing is off in git by default and could be confusing to people that haven't used auto-squashing before. I thought that making it easier to copy commit details would go some way to make creating auto-squashing commits from Atom easier and bring other benefits.
This is intended to make it easier to:
Currently to copy the commit SHA or subject you have to click on the commit to open it, select the text you want to copy, then copy it, then close the commit.
Note that I find it better to use the commit subjects rather than the SHAs for fixup commits since SHAs may change when performing a non-interactive rebase on a branch (and auto-squash commits only apply during interactive rebases).
None that I can think of - it's an isolated change and the ability is in a context menu so doesn't change the layout of the commit view.
Tested on Atom 1.42.0-nightly6 on OSX
I've added unit tests for the two copy actions in the recent commits view test file.
Please let me know if this should be documented.
This adds 'Copy Commit SHA' and 'Copy Commit Subject' to the right-click menu of the recent commits list. I've chosen to pass in the global atom clipboard from the `RecentCommitsController` to make it easier to test `RecentCommitsView` with a fake clipboard.
Thanks for taking the time to review & merge…
On Sat, 14 Sep 2019 at 12:53 am, Ash Wilson ***@***.***> wrote: Awesome! Thanks