Adds showQuickCommitDetails command to CodeLens

Adds showQuickRepoHistory command to CodeLens
Adds showQuickCommitDetails command to the status bar
Adds showQuickRepoHistory command to the status bar
Changes recent CodeLens default command to showQuickCommitDetails
Changes status bar default command to showQuickCommitDetails
This commit is contained in:
Eric Amodio
2017-02-16 23:33:09 -05:00
parent a4d55bcbcc
commit 28fced1b80
6 changed files with 69 additions and 28 deletions

View File

@@ -1,18 +1,21 @@
## Release Notes ## Release Notes
### 2.2.1 ### 2.2.1
- Overhauls the `gitlens.showQuickRepoHistory`, `gitlens.showQuickFileHistory`, and `gitlens.showQuickCommitDetails` quickpick lists - Overhauls the `gitlens.showQuickRepoHistory`, `gitlens.showQuickFileHistory`, and `gitlens.showQuickCommitDetails` quick pick lists
- Adds `Show Repository History` command to `gitlens.showQuickFileHistory` quickpick list - Adds `Show Repository History` command to `gitlens.showQuickFileHistory` quick pick list
- Adds `Show Previous Commits History` command to `gitlens.showQuickCommitDetails` quickpick list - Adds `Show Previous Commits History` command to `gitlens.showQuickCommitDetails` quick pick list
- Adds `Show Commits History` command to `gitlens.showQuickCommitDetails` quickpick list - Adds `Show Commits History` command to `gitlens.showQuickCommitDetails` quick pick list
- Adds `Copy Commit Sha to Clipboard` command to `gitlens.showQuickCommitDetails` quickpick list - Adds `Copy Commit Sha to Clipboard` command to `gitlens.showQuickCommitDetails` quick pick list
- Adds `Show Changed Files` command to `gitlens.showQuickCommitDetails` quickpick list - Adds `Show Changed Files` command to `gitlens.showQuickCommitDetails` quick pick list
- Adds more robust `go back` navigation in quickpick lists - Adds more robust `go back` navigation in quick pick lists
- Adds commit message to placeholder text of many quickpick lists - Adds commit message to placeholder text of many quick pick lists
- Adds icons for some commands - Adds icons for some commands
- Adds `gitlens.diffWithPrevious` command to the editor content menu - Adds `gitlens.diffWithPrevious` command to the editor content menu
- Adds `gitlens.diffWithWorking` command to the editor content menu - Adds `gitlens.diffWithWorking` command to the editor content menu
- Changes the default command of `gitlens.codeLens.recentChange.command` to `gitlens.showQuickFileHistory` - Adds `gitlens.showQuickRepoHistory` and `gitlens.showQuickCommitDetails` commands to CodeLens
- Adds `gitlens.showQuickRepoHistory` and `gitlens.showQuickCommitDetails` commands to the status bar
- Changes the default command of `gitlens.codeLens.recentChange.command` to `gitlens.showQuickCommitDetails`
- Changes the default command of `gitlens.statusBar.command` to `gitlens.showQuickCommitDetails`
- Changes behavior of `gitlens.showQuickFileHistory` when executed via CodeLens to open commit details directly - Changes behavior of `gitlens.showQuickFileHistory` when executed via CodeLens to open commit details directly
- Changes `gitlens.diffWithPrevious` command to behave as `gitlens.diffWithWorking` if the file has uncommitted changes - Changes `gitlens.diffWithPrevious` command to behave as `gitlens.diffWithWorking` if the file has uncommitted changes
- Renames `gitlens.diffWithPrevious` command from `Diff Commit with Previous` to `Compare with Previous Commit` - Renames `gitlens.diffWithPrevious` command from `Diff Commit with Previous` to `Compare with Previous Commit`
@@ -21,7 +24,7 @@
- Renames `gitlens.diffLineWithWorking` command from `Diff Commit (line) with Working Tree` to `Compare Line with Working Tree` - Renames `gitlens.diffLineWithWorking` command from `Diff Commit (line) with Working Tree` to `Compare Line with Working Tree`
- Fixes issues with certain git commands not working on Windows - Fixes issues with certain git commands not working on Windows
- Fixes [#31](https://github.com/eamodio/vscode-gitlens/issues/31) - Disable gitlens if the project does not have `.git` folder - Fixes [#31](https://github.com/eamodio/vscode-gitlens/issues/31) - Disable gitlens if the project does not have `.git` folder
- Fixes issue where quickpick lists could fail if there was no active editor - Fixes issue where quick pick lists could fail if there was no active editor
- Fixes CodeLens not updating in response to configuration changes - Fixes CodeLens not updating in response to configuration changes
### 2.1.1 ### 2.1.1
@@ -34,8 +37,8 @@
- Adds `alt+w` shortcut for the `gitlens.diffLineWithWorking` command - Adds `alt+w` shortcut for the `gitlens.diffLineWithWorking` command
- Adds `shift+alt+w` shortcut for the `gitlens.diffWithWorking` command - Adds `shift+alt+w` shortcut for the `gitlens.diffWithWorking` command
- Adds `gitlens.copyShaToClipboard` to copy commit sha to the clipboard ([#28](https://github.com/eamodio/vscode-gitlens/issues/28)) - Adds `gitlens.copyShaToClipboard` to copy commit sha to the clipboard ([#28](https://github.com/eamodio/vscode-gitlens/issues/28))
- Adds `gitlens.showQuickCommitDetails` to show a quickpick list of details for a commit - Adds `gitlens.showQuickCommitDetails` to show a quick pick list of details for a commit
- Adds `go back` choice to `gitlens.showQuickCommitDetails`, `gitlens.showQuickFileHistory`, and `gitlens.showQuickRepoHistory` quickpick lists - Adds `go back` choice to `gitlens.showQuickCommitDetails`, `gitlens.showQuickFileHistory`, and `gitlens.showQuickRepoHistory` quick pick lists
- Adds `gitlens.blame.annotation.highlight` to specify whether and how to highlight blame annotations ([#24](https://github.com/eamodio/vscode-gitlens/issues/24)) - Adds `gitlens.blame.annotation.highlight` to specify whether and how to highlight blame annotations ([#24](https://github.com/eamodio/vscode-gitlens/issues/24))
- Greatly improves performance of line navigation when either active line annotations or status bar blame is enabled - Greatly improves performance of line navigation when either active line annotations or status bar blame is enabled
- Fixes [#29](https://github.com/eamodio/vscode-gitlens/issues/29) - Commit info tooltip duplicated for current line when blame is enabled - Fixes [#29](https://github.com/eamodio/vscode-gitlens/issues/29) - Commit info tooltip duplicated for current line when blame is enabled

View File

@@ -41,12 +41,12 @@ Provides Git CodeLens information (most recent commit, # of authors), on-demand
|`gitlens.codeLens.locationCustomSymbols`|Specifies the set of document symbols to render active document CodeLens on. Must be a member of `SymbolKind` |`gitlens.codeLens.locationCustomSymbols`|Specifies the set of document symbols to render active document CodeLens on. Must be a member of `SymbolKind`
|`gitlens.codeLens.languageLocations`|Specifies where CodeLens will be rendered in the active document for the specified languages |`gitlens.codeLens.languageLocations`|Specifies where CodeLens will be rendered in the active document for the specified languages
|`gitlens.codeLens.recentChange.enabled`|Specifies whether the recent change CodeLens is shown |`gitlens.codeLens.recentChange.enabled`|Specifies whether the recent change CodeLens is shown
|`gitlens.codeLens.recentChange.command`|Specifies the command executed when the recent change CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker |`gitlens.codeLens.recentChange.command`|"Specifies the command executed when the recent change CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick
|`gitlens.codeLens.authors.enabled`|Specifies whether the authors CodeLens is shown |`gitlens.codeLens.authors.enabled`|Specifies whether the authors CodeLens is shown
|`gitlens.codeLens.authors.command`|Specifies the command executed when the authors CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker |`gitlens.codeLens.authors.command`|Specifies the command executed when the authors CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick
|`gitlens.menus.diff.enabled`|Specifies whether diff commands will be added to the context menus |`gitlens.menus.diff.enabled`|Specifies whether diff commands will be added to the context menus
|`gitlens.statusBar.enabled`|Specifies whether blame information is shown in the status bar |`gitlens.statusBar.enabled`|Specifies whether blame information is shown in the status bar
|`gitlens.statusBar.command`|"Specifies the command executed when the blame status bar item is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker |`gitlens.statusBar.command`|"Specifies the command executed when the blame status bar item is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick
## Known Issues ## Known Issues

View File

@@ -209,15 +209,17 @@
}, },
"gitlens.codeLens.recentChange.command": { "gitlens.codeLens.recentChange.command": {
"type": "string", "type": "string",
"default": "gitlens.showQuickFileHistory", "default": "gitlens.showQuickCommitDetails",
"enum": [ "enum": [
"gitlens.toggleBlame", "gitlens.toggleBlame",
"gitlens.showBlameHistory", "gitlens.showBlameHistory",
"gitlens.showFileHistory", "gitlens.showFileHistory",
"gitlens.diffWithPrevious", "gitlens.diffWithPrevious",
"gitlens.showQuickFileHistory" "gitlens.showQuickCommitDetails",
"gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command executed when the recent change CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker" "description": "Specifies the command executed when the recent change CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick"
}, },
"gitlens.codeLens.authors.enabled": { "gitlens.codeLens.authors.enabled": {
"type": "boolean", "type": "boolean",
@@ -232,9 +234,11 @@
"gitlens.showBlameHistory", "gitlens.showBlameHistory",
"gitlens.showFileHistory", "gitlens.showFileHistory",
"gitlens.diffWithPrevious", "gitlens.diffWithPrevious",
"gitlens.showQuickFileHistory" "gitlens.showQuickCommitDetails",
"gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command executed when the authors CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker" "description": "Specifies the command executed when the authors CodeLens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick"
}, },
"gitlens.menus.diff.enabled": { "gitlens.menus.diff.enabled": {
"type": "boolean", "type": "boolean",
@@ -248,16 +252,18 @@
}, },
"gitlens.statusBar.command": { "gitlens.statusBar.command": {
"type": "string", "type": "string",
"default": "gitlens.showQuickFileHistory", "default": "gitlens.showQuickCommitDetails",
"enum": [ "enum": [
"gitlens.toggleBlame", "gitlens.toggleBlame",
"gitlens.showBlameHistory", "gitlens.showBlameHistory",
"gitlens.showFileHistory", "gitlens.showFileHistory",
"gitlens.diffWithPrevious", "gitlens.diffWithPrevious",
"gitlens.toggleCodeLens", "gitlens.toggleCodeLens",
"gitlens.showQuickFileHistory" "gitlens.showQuickCommitDetails",
"gitlens.showQuickFileHistory",
"gitlens.showQuickRepoHistory"
], ],
"description": "Specifies the command executed when the blame status bar item is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickFileHistory` - shows a file history picker" "description": "Specifies the command executed when the blame status bar item is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current checked-in file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickFileHistory` - shows a repository history quick pick"
}, },
"gitlens.advanced.caching.enabled": { "gitlens.advanced.caching.enabled": {
"type": "boolean", "type": "boolean",

View File

@@ -226,9 +226,15 @@ export default class BlameActiveLineController extends Disposable {
case StatusBarCommand.ToggleCodeLens: case StatusBarCommand.ToggleCodeLens:
this._statusBarItem.tooltip = 'Toggle Git CodeLens'; this._statusBarItem.tooltip = 'Toggle Git CodeLens';
break; break;
case StatusBarCommand.ShowQuickFileHistory:
this._statusBarItem.tooltip = 'Show Commit Details';
break;
case StatusBarCommand.ShowQuickFileHistory: case StatusBarCommand.ShowQuickFileHistory:
this._statusBarItem.tooltip = 'Show File History'; this._statusBarItem.tooltip = 'Show File History';
break; break;
case StatusBarCommand.ShowQuickFileHistory:
this._statusBarItem.tooltip = 'Show Repository History';
break;
} }
this._statusBarItem.show(); this._statusBarItem.show();

View File

@@ -26,13 +26,15 @@ export interface IBlameConfig {
}; };
} }
export type CodeLensCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.diffWithPrevious' | 'gitlens.showQuickFileHistory'; export type CodeLensCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.diffWithPrevious' | 'gitlens.showQuickCommitDetails' | 'gitlens.showQuickFileHistory' | 'gitlens.showQuickRepoHistory';
export const CodeLensCommand = { export const CodeLensCommand = {
BlameAnnotate: Commands.ToggleBlame as CodeLensCommand, BlameAnnotate: Commands.ToggleBlame as CodeLensCommand,
ShowBlameHistory: Commands.ShowBlameHistory as CodeLensCommand, ShowBlameHistory: Commands.ShowBlameHistory as CodeLensCommand,
ShowFileHistory: Commands.ShowFileHistory as CodeLensCommand, ShowFileHistory: Commands.ShowFileHistory as CodeLensCommand,
DiffWithPrevious: Commands.DiffWithPrevious as CodeLensCommand, DiffWithPrevious: Commands.DiffWithPrevious as CodeLensCommand,
ShowQuickFileHistory: Commands.ShowQuickFileHistory as CodeLensCommand ShowQuickCommitDetails: Commands.ShowQuickCommitDetails as CodeLensCommand,
ShowQuickFileHistory: Commands.ShowQuickFileHistory as CodeLensCommand,
ShowQuickRepoHistory: Commands.ShowQuickRepoHistory as CodeLensCommand
}; };
export type CodeLensLocation = 'all' | 'document+containers' | 'document' | 'custom' | 'none'; export type CodeLensLocation = 'all' | 'document+containers' | 'document' | 'custom' | 'none';
@@ -71,14 +73,16 @@ export interface ICodeLensesConfig {
authors: ICodeLensConfig; authors: ICodeLensConfig;
} }
export type StatusBarCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.toggleCodeLens' | 'gitlens.diffWithPrevious' | 'gitlens.showQuickFileHistory'; export type StatusBarCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.showFileHistory' | 'gitlens.toggleCodeLens' | 'gitlens.diffWithPrevious' | 'gitlens.showQuickCommitDetails' | 'gitlens.showQuickFileHistory' | 'gitlens.showQuickRepoHistory';
export const StatusBarCommand = { export const StatusBarCommand = {
BlameAnnotate: Commands.ToggleBlame as StatusBarCommand, BlameAnnotate: Commands.ToggleBlame as StatusBarCommand,
ShowBlameHistory: Commands.ShowBlameHistory as StatusBarCommand, ShowBlameHistory: Commands.ShowBlameHistory as StatusBarCommand,
ShowFileHistory: Commands.ShowFileHistory as CodeLensCommand, ShowFileHistory: Commands.ShowFileHistory as CodeLensCommand,
DiffWithPrevious: Commands.DiffWithPrevious as StatusBarCommand, DiffWithPrevious: Commands.DiffWithPrevious as StatusBarCommand,
ToggleCodeLens: Commands.ToggleCodeLens as StatusBarCommand, ToggleCodeLens: Commands.ToggleCodeLens as StatusBarCommand,
ShowQuickFileHistory: Commands.ShowQuickFileHistory as StatusBarCommand ShowQuickCommitDetails: Commands.ShowQuickCommitDetails as StatusBarCommand,
ShowQuickFileHistory: Commands.ShowQuickFileHistory as StatusBarCommand,
ShowQuickRepoHistory: Commands.ShowQuickRepoHistory as StatusBarCommand
}; };
export interface IStatusBarConfig { export interface IStatusBarConfig {

View File

@@ -212,7 +212,9 @@ export default class GitCodeLensProvider implements CodeLensProvider {
case CodeLensCommand.ShowBlameHistory: return this._applyShowBlameHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit); case CodeLensCommand.ShowBlameHistory: return this._applyShowBlameHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
case CodeLensCommand.ShowFileHistory: return this._applyShowFileHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit); case CodeLensCommand.ShowFileHistory: return this._applyShowFileHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
case CodeLensCommand.DiffWithPrevious: return this._applyDiffWithPreviousCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit); case CodeLensCommand.DiffWithPrevious: return this._applyDiffWithPreviousCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
case CodeLensCommand.ShowQuickCommitDetails: return this._applyShowQuickCommitDetailsCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
case CodeLensCommand.ShowQuickFileHistory: return this._applyShowQuickFileHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit); case CodeLensCommand.ShowQuickFileHistory: return this._applyShowQuickFileHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
case CodeLensCommand.ShowQuickRepoHistory: return this._applyShowQuickRepoHistoryCommand<GitRecentChangeCodeLens>(title, lens, blame, recentCommit);
default: return lens; default: return lens;
} }
} }
@@ -227,7 +229,9 @@ export default class GitCodeLensProvider implements CodeLensProvider {
case CodeLensCommand.ShowBlameHistory: return this._applyShowBlameHistoryCommand<GitAuthorsCodeLens>(title, lens, blame); case CodeLensCommand.ShowBlameHistory: return this._applyShowBlameHistoryCommand<GitAuthorsCodeLens>(title, lens, blame);
case CodeLensCommand.ShowFileHistory: return this._applyShowFileHistoryCommand<GitAuthorsCodeLens>(title, lens, blame); case CodeLensCommand.ShowFileHistory: return this._applyShowFileHistoryCommand<GitAuthorsCodeLens>(title, lens, blame);
case CodeLensCommand.DiffWithPrevious: return this._applyDiffWithPreviousCommand<GitAuthorsCodeLens>(title, lens, blame); case CodeLensCommand.DiffWithPrevious: return this._applyDiffWithPreviousCommand<GitAuthorsCodeLens>(title, lens, blame);
case CodeLensCommand.ShowQuickCommitDetails: return this._applyShowQuickCommitDetailsCommand<GitAuthorsCodeLens>(title, lens, blame);
case CodeLensCommand.ShowQuickFileHistory: return this._applyShowQuickFileHistoryCommand<GitAuthorsCodeLens>(title, lens, blame); case CodeLensCommand.ShowQuickFileHistory: return this._applyShowQuickFileHistoryCommand<GitAuthorsCodeLens>(title, lens, blame);
case CodeLensCommand.ShowQuickRepoHistory: return this._applyShowQuickRepoHistoryCommand<GitAuthorsCodeLens>(title, lens, blame);
default: return lens; default: return lens;
} }
} }
@@ -295,7 +299,7 @@ export default class GitCodeLensProvider implements CodeLensProvider {
return lens; return lens;
} }
_applyShowQuickFileHistoryCommand<T extends GitRecentChangeCodeLens | GitAuthorsCodeLens>(title: string, lens: T, blame: IGitBlameLines, commit?: GitCommit): T { _applyShowQuickCommitDetailsCommand<T extends GitRecentChangeCodeLens | GitAuthorsCodeLens>(title: string, lens: T, blame: IGitBlameLines, commit?: GitCommit): T {
lens.command = { lens.command = {
title: title, title: title,
command: CodeLensCommand.ShowQuickFileHistory, command: CodeLensCommand.ShowQuickFileHistory,
@@ -303,4 +307,22 @@ export default class GitCodeLensProvider implements CodeLensProvider {
}; };
return lens; return lens;
} }
_applyShowQuickFileHistoryCommand<T extends GitRecentChangeCodeLens | GitAuthorsCodeLens>(title: string, lens: T, blame: IGitBlameLines, commit?: GitCommit): T {
lens.command = {
title: title,
command: CodeLensCommand.ShowQuickFileHistory,
arguments: [Uri.file(lens.uri.fsPath)]
};
return lens;
}
_applyShowQuickRepoHistoryCommand<T extends GitRecentChangeCodeLens | GitAuthorsCodeLens>(title: string, lens: T, blame: IGitBlameLines, commit?: GitCommit): T {
lens.command = {
title: title,
command: CodeLensCommand.ShowQuickRepoHistory,
arguments: [Uri.file(lens.uri.fsPath)]
};
return lens;
}
} }