Bladeren bron

Aligns terminology and settings

main
Eric Amodio 5 jaren geleden
bovenliggende
commit
4b0a7a0442
8 gewijzigde bestanden met toevoegingen van 47 en 45 verwijderingen
  1. +8
    -8
      README.md
  2. +4
    -4
      package.json
  3. +28
    -26
      src/commands/git/search.ts
  4. +1
    -1
      src/commands/git/stash.ts
  5. +1
    -1
      src/commands/searchCommits.ts
  6. +1
    -1
      src/config.ts
  7. +1
    -1
      src/git/formatters/commitFormatter.ts
  8. +3
    -3
      src/quickpicks/commonQuickPicks.ts

+ 8
- 8
README.md Bestand weergeven

@ -832,14 +832,14 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
### Git Commands Menu Settings [#](#git-commands-menu-settings- 'Git Commands Menu Settings')
| Name | Description |
| --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.gitCommands.closeOnFocusOut` | Specifies whether to dismiss the Git Commands menu when focus is lost (if not, press `ESC` to dismiss) |
| `gitlens.gitCommands.search.matchAll` | Specifies whether to match all or any commit message search patterns |
| `gitlens.gitCommands.search.matchCase` | Specifies whether to match commit search patterns with or without regard to casing |
| `gitlens.gitCommands.search.matchRegex` | Specifies whether to match commit search patterns using regular expressions |
| `gitlens.gitCommands.search.showInView` | Specifies whether to show the results of a commit search in the _Search Commits_ view or directly within the quick pick menu |
| `gitlens.gitCommands.skipConfirmations` | Specifies which (and when) Git commands will skip the confirmation step, using the format: `git-command-name:(menu|command)` |
| Name | Description |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.gitCommands.closeOnFocusOut` | Specifies whether to dismiss the Git Commands menu when focus is lost (if not, press `ESC` to dismiss) |
| `gitlens.gitCommands.search.matchAll` | Specifies whether to match all or any commit message search patterns |
| `gitlens.gitCommands.search.matchCase` | Specifies whether to match commit search patterns with or without regard to casing |
| `gitlens.gitCommands.search.matchRegex` | Specifies whether to match commit search patterns using regular expressions |
| `gitlens.gitCommands.search.showResultsInView` | Specifies whether to show the commit search results in the _Search Commits_ view or directly within the quick pick menu |
| `gitlens.gitCommands.skipConfirmations` | Specifies which (and when) Git commands will skip the confirmation step, using the format: `git-command-name:(menu|command)` |
### Date & Time Settings [#](#date--time-settings- 'Date & Time Settings')

+ 4
- 4
package.json Bestand weergeven

@ -505,10 +505,10 @@
"markdownDescription": "Specifies whether to match commit search patterns using regular expressions",
"scope": "window"
},
"gitlens.gitCommands.search.showInView": {
"gitlens.gitCommands.search.showResultsInView": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to show the results of a commit search in the _Search Commits_ view or directly within the quick pick menu",
"markdownDescription": "Specifies whether to show the commit search results in the _Search Commits_ view or directly within the quick pick menu",
"scope": "window"
},
"gitlens.gitCommands.skipConfirmations": {
@ -2228,12 +2228,12 @@
},
{
"command": "gitlens.showCommitInView",
"title": "Open in Search Commits View",
"title": "Show Commit in Search Commits View",
"category": "GitLens"
},
{
"command": "gitlens.showFileHistoryInView",
"title": "Open in File History View",
"title": "Show in File History View",
"category": "GitLens"
},
{

+ 28
- 26
src/commands/git/search.ts Bestand weergeven

@ -25,7 +25,7 @@ import {
interface State extends Required<SearchPattern> {
repo: Repository;
showInView: boolean;
showResultsInView: boolean;
}
export interface SearchGitCommandArgs {
@ -100,31 +100,31 @@ export class SearchGitCommand extends QuickCommandBase {
tooltip: 'Match using Regular Expressions'
};
static readonly OpenInView: QuickInputButton = {
iconPath: {
dark: Container.context.asAbsolutePath('images/dark/icon-open.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-open.svg') as any
},
tooltip: 'Open in Search Commits View'
};
static readonly RevealInView: QuickInputButton = {
iconPath: {
dark: Container.context.asAbsolutePath('images/dark/icon-eye.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-eye.svg') as any
},
tooltip: 'Reveal in Repositories View'
tooltip: 'Reveal Commit in Repositories View'
};
static readonly ShowInView: QuickInputButton = {
iconPath: {
dark: Container.context.asAbsolutePath('images/dark/icon-open.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-open.svg') as any
},
tooltip: 'Show Commit in Search Commits View'
};
static readonly ShowResultsInView: QuickInputButton = {
iconPath: {
dark: Container.context.asAbsolutePath('images/dark/icon-eye.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-eye.svg') as any
},
tooltip: 'Show Results in Search Commits View'
};
static readonly ShowInViewSelected: QuickInputButton = {
static readonly ShowResultsInViewSelected: QuickInputButton = {
iconPath: {
dark: Container.context.asAbsolutePath('images/dark/icon-eye-selected.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-eye-selected.svg') as any
@ -181,8 +181,8 @@ export class SearchGitCommand extends QuickCommandBase {
if (state.matchRegex === undefined) {
state.matchRegex = cfg.matchRegex;
}
if (state.showInView === undefined) {
state.showInView = cfg.showInView;
if (state.showResultsInView === undefined) {
state.showResultsInView = cfg.showResultsInView;
}
while (true) {
@ -260,8 +260,10 @@ export class SearchGitCommand extends QuickCommandBase {
const matchRegexButton: Mutable<QuickInputButton> = {
...(state.matchRegex ? this.Buttons.MatchRegexSelected : this.Buttons.MatchRegex)
};
const showInViewButton: Mutable<QuickInputButton> = {
...(state.showInView ? this.Buttons.ShowInViewSelected : this.Buttons.ShowInView)
const showResultsInViewButton: Mutable<QuickInputButton> = {
...(state.showResultsInView
? this.Buttons.ShowResultsInViewSelected
: this.Buttons.ShowResultsInView)
};
const step = this.createPickStep<QuickPickItemOfT<string>>({
@ -269,7 +271,7 @@ export class SearchGitCommand extends QuickCommandBase {
placeholder: 'e.g. "Updates dependencies" author:eamodio',
matchOnDescription: true,
matchOnDetail: true,
additionalButtons: [matchCaseButton, matchAllButton, matchRegexButton, showInViewButton],
additionalButtons: [matchCaseButton, matchAllButton, matchRegexButton, showResultsInViewButton],
items: items,
value: state.pattern,
onDidAccept: (quickpick): boolean => {
@ -315,11 +317,11 @@ export class SearchGitCommand extends QuickCommandBase {
return;
}
if (button === showInViewButton) {
state.showInView = !state.showInView;
showInViewButton.iconPath = state.showInView
? this.Buttons.ShowInViewSelected.iconPath
: this.Buttons.ShowInView.iconPath;
if (button === showResultsInViewButton) {
state.showResultsInView = !state.showResultsInView;
showResultsInViewButton.iconPath = state.showResultsInView
? this.Buttons.ShowResultsInViewSelected.iconPath
: this.Buttons.ShowResultsInView.iconPath;
}
},
onDidChangeValue: (quickpick): boolean => {
@ -371,7 +373,7 @@ export class SearchGitCommand extends QuickCommandBase {
resultsKey = searchKey;
}
if (state.showInView) {
if (state.showResultsInView) {
void Container.searchView.search(
state.repo.path,
search,
@ -411,9 +413,9 @@ export class SearchGitCommand extends QuickCommandBase {
)
)
],
additionalButtons: [this.Buttons.RevealInView, this.Buttons.OpenInView],
additionalButtons: [this.Buttons.RevealInView, this.Buttons.ShowInView],
onDidClickButton: (quickpick, button) => {
if (button === this.Buttons.OpenInView) {
if (button === this.Buttons.ShowInView) {
void Container.searchView.search(
state.repo!.path,
search,
@ -481,9 +483,9 @@ export class SearchGitCommand extends QuickCommandBase {
items: await CommitQuickPick.getItems(pickedCommit, pickedCommit.toGitUri(), {
showChanges: false
}),
additionalButtons: [this.Buttons.RevealInView, this.Buttons.OpenInView],
additionalButtons: [this.Buttons.RevealInView, this.Buttons.ShowInView],
onDidClickButton: (quickpick, button) => {
if (button === this.Buttons.OpenInView) {
if (button === this.Buttons.ShowInView) {
void Container.searchView.search(
pickedCommit!.repoPath,
{ pattern: SearchPattern.fromCommit(pickedCommit!) },

+ 1
- 1
src/commands/git/stash.ts Bestand weergeven

@ -87,7 +87,7 @@ export class StashGitCommand extends QuickCommandBase {
dark: Container.context.asAbsolutePath('images/dark/icon-eye.svg') as any,
light: Container.context.asAbsolutePath('images/light/icon-eye.svg') as any
},
tooltip: 'Reveal in Repositories View'
tooltip: 'Reveal Stash in Repositories View'
};
};

+ 1
- 1
src/commands/searchCommits.ts Bestand weergeven

@ -57,7 +57,7 @@ export class SearchCommitsCommand extends Command {
state: {
repo: repo,
...args.search,
showInView: args.showInView
showResultsInView: args.showInView
}
};
return commands.executeCommand(Commands.GitCommands, gitCommandArgs);

+ 1
- 1
src/config.ts Bestand weergeven

@ -38,7 +38,7 @@ export interface Config {
matchAll: boolean;
matchCase: boolean;
matchRegex: boolean;
showInView: boolean;
showResultsInView: boolean;
};
skipConfirmations: string[];
};

+ 1
- 1
src/git/formatters/commitFormatter.ts Bestand weergeven

@ -230,7 +230,7 @@ export class CommitFormatter extends Formatter {
if (this._options.remotes !== undefined && this._options.remotes.length !== 0) {
commands += `**[\` ${GlyphChars.ArrowUpRight} \`](${OpenCommitInRemoteCommand.getMarkdownCommandArgs(
this._item.sha
)} "Open in Remote")** `;
)} "Open on Remote")** `;
}
if (this._item.author !== 'You') {

+ 3
- 3
src/quickpicks/commonQuickPicks.ts Bestand weergeven

@ -102,7 +102,7 @@ export class OpenInSearchCommitsViewQuickPickItem extends CommandQuickPickItem {
constructor(
public readonly commit: GitLogCommit,
item: QuickPickItem = {
label: '$(link-external) Open in Search Commits View',
label: '$(link-external) Show Commit in Search Commits View',
description: ''
}
) {
@ -129,7 +129,7 @@ export class OpenInFileHistoryViewQuickPickItem extends CommandQuickPickItem {
public readonly uri: GitUri,
public readonly baseRef: string | undefined,
item: QuickPickItem = {
label: '$(eye) Open in File History View',
label: '$(eye) Show in File History View',
description: 'shows the file history in the File History view'
}
) {
@ -145,7 +145,7 @@ export class RevealInRepositoriesViewQuickPickItem extends CommandQuickPickItem
constructor(
public readonly commit: GitLogCommit | GitStashCommit,
item: QuickPickItem = {
label: '$(eye) Reveal in Repositories View',
label: '$(eye) Reveal Commit in Repositories View',
description: `${commit.isStash ? '' : `${GlyphChars.Dash} this can take a while`}`
}
) {

Laden…
Annuleren
Opslaan