Преглед на файлове

Aligns terminology and settings

main
Eric Amodio преди 5 години
родител
ревизия
4b0a7a0442
променени са 8 файла, в които са добавени 47 реда и са изтрити 45 реда
  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 Целия файл

@ -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') ### 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') ### Date & Time Settings [#](#date--time-settings- 'Date & Time Settings')

+ 4
- 4
package.json Целия файл

@ -505,10 +505,10 @@
"markdownDescription": "Specifies whether to match commit search patterns using regular expressions", "markdownDescription": "Specifies whether to match commit search patterns using regular expressions",
"scope": "window" "scope": "window"
}, },
"gitlens.gitCommands.search.showInView": {
"gitlens.gitCommands.search.showResultsInView": {
"type": "boolean", "type": "boolean",
"default": true, "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" "scope": "window"
}, },
"gitlens.gitCommands.skipConfirmations": { "gitlens.gitCommands.skipConfirmations": {
@ -2228,12 +2228,12 @@
}, },
{ {
"command": "gitlens.showCommitInView", "command": "gitlens.showCommitInView",
"title": "Open in Search Commits View",
"title": "Show Commit in Search Commits View",
"category": "GitLens" "category": "GitLens"
}, },
{ {
"command": "gitlens.showFileHistoryInView", "command": "gitlens.showFileHistoryInView",
"title": "Open in File History View",
"title": "Show in File History View",
"category": "GitLens" "category": "GitLens"
}, },
{ {

+ 28
- 26
src/commands/git/search.ts Целия файл

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

+ 1
- 1
src/commands/git/stash.ts Целия файл

@ -87,7 +87,7 @@ export class StashGitCommand extends QuickCommandBase {
dark: Container.context.asAbsolutePath('images/dark/icon-eye.svg') as any, dark: Container.context.asAbsolutePath('images/dark/icon-eye.svg') as any,
light: Container.context.asAbsolutePath('images/light/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 Целия файл

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

+ 1
- 1
src/config.ts Целия файл

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

+ 1
- 1
src/git/formatters/commitFormatter.ts Целия файл

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

+ 3
- 3
src/quickpicks/commonQuickPicks.ts Целия файл

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

Зареждане…
Отказ
Запис