mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-17 01:35:37 -05:00
Reworks commanding structure for less redundancy
Adds command args copying when needed
This commit is contained in:
@@ -24,7 +24,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand
|
||||
super(Commands.ShowQuickCommitFileDetails);
|
||||
}
|
||||
|
||||
async execute(editor: TextEditor, uri?: Uri, args: ShowQuickCommitFileDetailsCommandArgs = {}) {
|
||||
async execute(editor?: TextEditor, uri?: Uri, args: ShowQuickCommitFileDetailsCommandArgs = {}) {
|
||||
uri = getCommandUri(uri, editor);
|
||||
if (uri === undefined) return undefined;
|
||||
|
||||
@@ -32,6 +32,7 @@ export class ShowQuickCommitFileDetailsCommand extends ActiveEditorCachedCommand
|
||||
|
||||
const gitUri = await GitUri.fromUri(uri, this.git);
|
||||
|
||||
args = { ...args };
|
||||
if (args.sha === undefined) {
|
||||
if (editor === undefined) return undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user