瀏覽代碼

2728 Submodule commit graph will not open in the panel layout (#2733)

* Sends command args through to graph when it is in a view

Adds missing repository set flag

* Reverts webview changes, converts uri to repo before passing through
main
Ramin Tadayon 1 年之前
committed by GitHub
父節點
當前提交
da288f50bc
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 1 個文件被更改,包括 10 次插入4 次删除
  1. +10
    -4
      src/commands/showView.ts

+ 10
- 4
src/commands/showView.ts 查看文件

@ -27,11 +27,13 @@ export class ShowViewCommand extends Command {
]);
}
protected override preExecute(context: CommandContext) {
return this.execute(context.command as Commands);
protected override preExecute(context: CommandContext, ...args: any[]) {
return this.execute(context, ...args);
}
async execute(command: Commands) {
async execute(context: CommandContext, ...args: any[]) {
const command = context.command as Commands;
let commandArgs = args;
switch (command) {
case Commands.ShowBranchesView:
return this.container.branchesView.show();
@ -48,7 +50,11 @@ export class ShowViewCommand extends Command {
case Commands.ShowAccountView:
return this.container.accountView.show();
case Commands.ShowGraphView:
return this.container.graphView.show();
if (context.type === 'scm' && context.scm?.rootUri != null) {
const repo = this.container.git.getRepository(context.scm.rootUri);
commandArgs = repo != null ? [repo, ...args] : args;
}
return this.container.graphView.show(undefined, ...commandArgs);
case Commands.ShowLineHistoryView:
return this.container.lineHistoryView.show();
case Commands.ShowRemotesView:

Loading…
取消
儲存