From 424fd60e869b7842af76d9b3b10bbe865e9b3f3d Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Thu, 3 Dec 2020 01:08:23 -0500 Subject: [PATCH] Changes from commit id to SHA --- README.md | 16 ++++++++-------- package.json | 6 +++--- src/commands/copyShaToClipboard.ts | 6 +++--- src/commands/git/search.ts | 4 ++-- src/commands/git/show.ts | 2 +- src/commands/quickCommand.steps.ts | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index f7ebbcf..a1b24b1 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ Here are just some of the **features** that GitLens provides, - Adds a **details hover** annotation to the current line to show more commit details ([optional](#hover-settings- 'Jump to the Hover settings'), on by default) - Provides **automatic issue linking** to Bitbucket, GitHub, GitLab, and Azure DevOps in commit messages - Provides a **quick-access command bar** with _Open Changes_, _Blame Previous Revision_, _Open on Remote_, _Invite to Live Share_ (if available), and _Show More Actions_ command buttons - - Click the commit id to execute the _Show Commit_ command + - Click the commit SHA to execute the _Show Commit_ command #### Changes (diff) Hover @@ -170,7 +170,7 @@ Here are just some of the **features** that GitLens provides, - Adds a **changes (diff) hover** annotation to the current line to show the line's previous version ([optional](#hover-settings- 'Jump to the Hover settings'), on by default) - Click the **Changes** to execute the _Open Changes_ command - - Click the current and previous commit ids to execute the _Show Commit_ command + - Click the current and previous commit SHAs to execute the _Show Commit_ command ### Annotation Hovers @@ -189,7 +189,7 @@ Here are just some of the **features** that GitLens provides, - Adds a **details hover** annotation to each line while annotating to show more commit details ([optional](#hover-settings- 'Jump to the Hover settings'), on by default) - Provides **automatic issue linking** to Bitbucket, GitHub, GitLab, and Azure DevOps in commit messages - Provides a **quick-access command bar** with _Open Changes_, _Blame Previous Revision_, _Open on Remote_, _Invite to Live Share_ (if available), and _Show More Actions_ command buttons - - Click the commit id to execute the _Show Commit_ command + - Click the commit SHA to execute the _Show Commit_ command ### Changes (diff) Hover @@ -199,7 +199,7 @@ Here are just some of the **features** that GitLens provides, - Adds a **changes (diff) hover** annotation to each line while annotating to show the line's previous version ([optional](#hover-settings- 'Jump to the Hover settings'), on by default) - Click the **Changes** to execute the _Open Changes_ command - - Click the current and previous commit ids to execute the _Show Commit_ command + - Click the current and previous commit SHAs to execute the _Show Commit_ command ## Gutter Blame [#](#gutter-blame- 'Gutter Blame') @@ -391,7 +391,7 @@ The _Search & Compare_ view lists pinnable (saved) results for searching commit - _Search Commits_ command (`gitlens.showCommitSearch`) can search - by message — use `` to find commits with messages that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---grepltpatterngt 'Open Git docs') - or, by author — use `@` to find commits with authors that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---authorltpatterngt 'Open Git docs') - - or, by commit id — use `#` to find a commit with id of `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs') + - or, by commit SHA — use `#` to find a commit with SHA of `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs') - or, by files — use `:` to find commits with file names that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---ltpathgt82308203 'Open Git docs') - or, by changes — use `~` to find commits with differences whose patch text contains added/removed lines that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt--Gltregexgt 'Open Git docs') - _Show File History_ command (`gitlens.showQuickFileHistory`) @@ -475,7 +475,7 @@ The Repositories view lists opened Git repositories, and additionally provides, - Adds a _Search Commits_ command (`gitlens.showCommitSearch`) to show quick pick menu to search for commits - by message — use `` to find commits with messages that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---grepltpatterngt 'Open Git docs') - or, by author — use `@` to find commits with authors that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---authorltpatterngt 'Open Git docs') - - or, by commit id — use `#` to find a commit with id of `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs') + - or, by commit SHA — use `#` to find a commit with id of `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs') - or, by files — use `:` to find commits with file names that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---ltpathgt82308203 'Open Git docs') - or, by changes — use `~` to find commits with differences whose patch text contains added/removed lines that match `` — See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt--Gltregexgt 'Open Git docs') @@ -561,7 +561,7 @@ Additionally, these integrations provide commands to copy the url of or open, fi - Adds an _Add Co-authors_ command (`gitlens.addAuthors`) to add a co-author to the commit message input box -- Adds a _Copy SHA_ command (`gitlens.copyShaToClipboard`) to copy the commit id (sha) of the current line to the clipboard or from the most recent commit to the current branch, if there is no current editor +- Adds a _Copy SHA_ command (`gitlens.copyShaToClipboard`) to copy the commit SHA of the current line to the clipboard or from the most recent commit to the current branch, if there is no current editor - Adds a _Copy Message_ command (`gitlens.copyMessageToClipboard`) to copy the commit message of the current line to the clipboard or from the most recent commit to the current branch, if there is no current editor - Adds a _Switch to Another Branch_ (`gitlens.views.switchToAnotherBranch`) command — to quickly switch the current branch @@ -902,7 +902,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings') | `gitlens.liveshare.allowGuestAccess` | Specifies whether to allow guest access to GitLens features when using Visual Studio Live Share | | `gitlens.outputLevel` | Specifies how much (if any) output will be sent to the GitLens output channel | | `gitlens.showWhatsNewAfterUpgrades` | Specifies whether to show What's New after upgrading to new feature releases | -| `gitlens.advanced.abbreviatedShaLength` | Specifies the length of abbreviated commit ids (shas) | +| `gitlens.advanced.abbreviatedShaLength` | Specifies the length of abbreviated commit SHAs (shas) | | `gitlens.advanced.blame.customArguments` | Specifies additional arguments to pass to the `git blame` command | | `gitlens.advanced.blame.delayAfterEdit` | Specifies the time (in milliseconds) to wait before re-blaming an unsaved document after an edit. Use 0 to specify an infinite wait | | `gitlens.advanced.blame.sizeThresholdAfterEdit` | Specifies the maximum document size (in lines) allowed to be re-blamed after an edit while still unsaved. Use 0 to specify no maximum | diff --git a/package.json b/package.json index 714b1e0..cdf21bd 100644 --- a/package.json +++ b/package.json @@ -1430,7 +1430,7 @@ }, "commit": { "type": "string", - "description": "Specifies the format of a commit url for the custom remote service\nAvailable tokens\n ${repo}` — repository path\n ${id}` — commit id" + "description": "Specifies the format of a commit url for the custom remote service\nAvailable tokens\n ${repo}` — repository path\n ${id}` — commit SHA" }, "file": { "type": "string", @@ -1442,7 +1442,7 @@ }, "fileInCommit": { "type": "string", - "description": "Specifies the format of a commit file url for the custom remote service\nAvailable tokens\n ${repo}` — repository path\n ${file}` — file name\n ${id}` — commit id\n ${line}` — formatted line information" + "description": "Specifies the format of a commit file url for the custom remote service\nAvailable tokens\n ${repo}` — repository path\n ${file}` — file name\n ${id}` — commit SHA\n ${line}` — formatted line information" }, "fileLine": { "type": "string", @@ -2228,7 +2228,7 @@ "gitlens.advanced.abbreviatedShaLength": { "type": "number", "default": "7", - "markdownDescription": "Specifies the length of abbreviated commit ids (shas)", + "markdownDescription": "Specifies the length of abbreviated commit SHAs", "scope": "window" }, "gitlens.advanced.blame.customArguments": { diff --git a/src/commands/copyShaToClipboard.ts b/src/commands/copyShaToClipboard.ts index 4c00753..fe62964 100644 --- a/src/commands/copyShaToClipboard.ts +++ b/src/commands/copyShaToClipboard.ts @@ -72,7 +72,7 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand { args.sha = blame.commit.sha; } catch (ex) { Logger.error(ex, 'CopyShaToClipboardCommand', `getBlameForLine(${blameline})`); - void Messages.showGenericErrorMessage('Unable to copy commit id'); + void Messages.showGenericErrorMessage('Unable to copy commit SHA'); return; } @@ -83,14 +83,14 @@ export class CopyShaToClipboardCommand extends ActiveEditorCommand { const msg: string = ex?.message ?? ''; if (msg.includes("Couldn't find the required `xsel` binary")) { void window.showErrorMessage( - 'Unable to copy commit id, xsel is not installed. Please install it via your package manager, e.g. `sudo apt install xsel`', + 'Unable to copy commit SHA, xsel is not installed. Please install it via your package manager, e.g. `sudo apt install xsel`', ); return; } Logger.error(ex, 'CopyShaToClipboardCommand'); - void Messages.showGenericErrorMessage('Unable to copy commit id'); + void Messages.showGenericErrorMessage('Unable to copy commit SHA'); } } } diff --git a/src/commands/git/search.ts b/src/commands/git/search.ts index 0bd0d34..07ad9dc 100644 --- a/src/commands/git/search.ts +++ b/src/commands/git/search.ts @@ -45,8 +45,8 @@ const searchOperatorToTitleMap = new Map([ ['message:', 'Search by Message'], ['@:', 'Search by Author'], ['author:', 'Search by Author'], - ['#:', 'Search by Commit ID'], - ['commit:', 'Search by Commit ID'], + ['#:', 'Search by Commit SHA'], + ['commit:', 'Search by Commit SHA'], ['?:', 'Search by File'], ['file:', 'Search by File'], ['~:', 'Search by Changes'], diff --git a/src/commands/git/show.ts b/src/commands/git/show.ts index 710eae7..82fcefa 100644 --- a/src/commands/git/show.ts +++ b/src/commands/git/show.ts @@ -125,7 +125,7 @@ export class ShowGitCommand extends QuickCommand { limit: undefined, hasMore: false, }, - placeholder: 'Enter a reference or commit id ', + placeholder: 'Enter a reference or commit SHA', picked: state.reference?.ref, }); if (result === StepResult.Break) { diff --git a/src/commands/quickCommand.steps.ts b/src/commands/quickCommand.steps.ts index 50c6977..274d932 100644 --- a/src/commands/quickCommand.steps.ts +++ b/src/commands/quickCommand.steps.ts @@ -281,7 +281,7 @@ export function getValidateGitReferenceFn(repos: Repository | Repository[], opti if (inRefMode) { quickpick.items = [ DirectiveQuickPickItem.create(Directive.Back, true, { - label: 'Enter a reference or commit id', + label: 'Enter a reference or commit SHA', }), ]; return true;