Skip to content

Fixes #1062 - enables copying of short commit SHAs#1316

Merged
eamodio merged 2 commits into
gitkraken:mainfrom
br3ndonland:1062-commit-ids
Jan 14, 2021
Merged

Fixes #1062 - enables copying of short commit SHAs#1316
eamodio merged 2 commits into
gitkraken:mainfrom
br3ndonland:1062-commit-ids

Conversation

@br3ndonland

@br3ndonland br3ndonland commented Jan 11, 2021

Copy link
Copy Markdown
Contributor

Description

As described in #1062, it would be helpful to be able to copy abbreviated commit SHAs instead of full-length SHAs.

#611 provided a setting for commit SHA length, gitlens.advanced.abbreviatedShaLength. This PR will add a Boolean setting, gitlens.advanced.useAbbreviatedShaLengthForCopy. If true, GitLens will copy the number of characters set in gitlens.advanced.abbreviatedShaLength.

Checklist

  • I have followed the guidelines in the Contributing document
  • My changes follow the coding style of this project
  • My changes build without any errors or warnings
  • My changes have been formatted and linted
  • My changes include any required corresponding changes to the documentation
  • My changes have been rebased and squashed to the minimal number (typically 1) of relevant commits
  • My changes have a descriptive commit message with a short title, including a Fixes $XXX - or Closes #XXX - prefix to auto-close the issue that your PR addresses

br3ndonland and others added 2 commits January 10, 2021 19:26
#611 added a setting for commit SHA length,
`gitlens.advanced.abbreviatedShaLength`.

This commit will add `gitlens.advanced.useAbbreviatedShaLengthForCopy`,
which will copy the abbreviated commit SHA instead of the full SHA.
Respects `gitlens.advanced.abbreviatedShaLength`.
@eamodio eamodio merged commit 66ec481 into gitkraken:main Jan 14, 2021
@eamodio eamodio self-assigned this Jan 14, 2021
@eamodio eamodio added this to the Soon™ milestone Jan 14, 2021
@eamodio

eamodio commented Jan 14, 2021

Copy link
Copy Markdown
Member

FYI, I changed the setting name to be abbreviateShaOnCopy

Thank you for your contribution!

Thank you

@br3ndonland br3ndonland deleted the 1062-commit-ids branch January 14, 2021 15:55
br3ndonland added a commit to br3ndonland/dotfiles that referenced this pull request Feb 2, 2021
aacb7b2
gitkraken/vscode-gitlens#1316
https://github.com/eamodio/vscode-gitlens/releases/tag/v11.2.0
https://gitlens.amod.io/#whats-new

- Remove deprecated settings: `gitlens.views.lineHistory.enabled`,
  `gitlens.views.repositories.enabled`
- Add new setting for copying abbreviated commit SHAs
  `gitlens.advanced.abbreviateShaOnCopy` (gitkraken/vscode-gitlens#1316)
@eamodio eamodio modified the milestones: Soon™, Shipped Feb 3, 2021
br3ndonland added a commit to br3ndonland/dotfiles that referenced this pull request Feb 26, 2021
aacb7b2
gitkraken/vscode-gitlens#1316
https://github.com/eamodio/vscode-gitlens/releases/tag/v11.2.0
https://gitlens.amod.io/#whats-new

- Remove deprecated settings: `gitlens.views.lineHistory.enabled`,
  `gitlens.views.repositories.enabled`
- Add new setting for copying abbreviated commit SHAs
  `gitlens.advanced.abbreviateShaOnCopy` (gitkraken/vscode-gitlens#1316)
@strazto

strazto commented Aug 24, 2022

Copy link
Copy Markdown

Does/Can this apply to gitlens.copyRemoteFileUrlToClipboard ?

@eamodio

eamodio commented Aug 28, 2022

Copy link
Copy Markdown
Member

@matthewstrasiotto it does not. While GitHub seems to support this, I'm not sure about the other providers. Please open a new feature request if you'd want this functionality. But know that we'd need help from the community to test if it would work for all the currently supported remote providers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants