Kaynağa Gözat

Changes from commit id to SHA

main
Eric Amodio 4 yıl önce
ebeveyn
işleme
424fd60e86
6 değiştirilmiş dosya ile 18 ekleme ve 18 silme
  1. +8
    -8
      README.md
  2. +3
    -3
      package.json
  3. +3
    -3
      src/commands/copyShaToClipboard.ts
  4. +2
    -2
      src/commands/git/search.ts
  5. +1
    -1
      src/commands/git/show.ts
  6. +1
    -1
      src/commands/quickCommand.steps.ts

+ 8
- 8
README.md Dosyayı Görüntüle

@ -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 &mdash; use `<message>` to find commits with messages that match `<message>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---grepltpatterngt 'Open Git docs')
- or, by author &mdash; use `@<pattern>` to find commits with authors that match `<pattern>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---authorltpatterngt 'Open Git docs')
- or, by commit id &mdash; use `#<sha>` to find a commit with id of `<sha>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs')
- or, by commit SHA &mdash; use `#<sha>` to find a commit with SHA of `<sha>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs')
- or, by files &mdash; use `:<path/glob>` to find commits with file names that match `<path/glob>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---ltpathgt82308203 'Open Git docs')
- or, by changes &mdash; use `~<pattern>` to find commits with differences whose patch text contains added/removed lines that match `<pattern>` &mdash; 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 &mdash; use `<message>` to find commits with messages that match `<message>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---grepltpatterngt 'Open Git docs')
- or, by author &mdash; use `@<pattern>` to find commits with authors that match `<pattern>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---authorltpatterngt 'Open Git docs')
- or, by commit id &mdash; use `#<sha>` to find a commit with id of `<sha>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs')
- or, by commit SHA &mdash; use `#<sha>` to find a commit with id of `<sha>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt-ltrevisionrangegt 'Open Git docs')
- or, by files &mdash; use `:<path/glob>` to find commits with file names that match `<path/glob>` &mdash; See [Git docs](https://git-scm.com/docs/git-log#Documentation/git-log.txt---ltpathgt82308203 'Open Git docs')
- or, by changes &mdash; use `~<pattern>` to find commits with differences whose patch text contains added/removed lines that match `<pattern>` &mdash; 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 &mdash; 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 |

+ 3
- 3
package.json Dosyayı Görüntüle

@ -1430,7 +1430,7 @@
},
"commit": {
"type": "string",
"description": "Specifies the format of a commit url for the custom remote service\nAvailable tokens\n ${repo}` &mdash; repository path\n ${id}` &mdash; commit id"
"description": "Specifies the format of a commit url for the custom remote service\nAvailable tokens\n ${repo}` &mdash; repository path\n ${id}` &mdash; 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}` &mdash; repository path\n ${file}` &mdash; file name\n ${id}` &mdash; commit id\n ${line}` &mdash; formatted line information"
"description": "Specifies the format of a commit file url for the custom remote service\nAvailable tokens\n ${repo}` &mdash; repository path\n ${file}` &mdash; file name\n ${id}` &mdash; commit SHA\n ${line}` &mdash; 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": {

+ 3
- 3
src/commands/copyShaToClipboard.ts Dosyayı Görüntüle

@ -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');
}
}
}

+ 2
- 2
src/commands/git/search.ts Dosyayı Görüntüle

@ -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'],

+ 1
- 1
src/commands/git/show.ts Dosyayı Görüntüle

@ -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) {

+ 1
- 1
src/commands/quickCommand.steps.ts Dosyayı Görüntüle

@ -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;

Yükleniyor…
İptal
Kaydet