浏览代码

Fixes remote name in graph 'Open Branch on Remote'

main
Ramin Tadayon 1年前
父节点
当前提交
fe6b26928a
找不到此签名对应的密钥 GPG 密钥 ID: 79D60DDE3DFB95F5
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. +8
    -1
      src/plus/webviews/graph/graphWebview.ts

+ 8
- 1
src/plus/webviews/graph/graphWebview.ts 查看文件

@ -2180,13 +2180,20 @@ export class GraphWebviewProvider implements WebviewProvider {
private openBranchOnRemote(item?: GraphItemContext, clipboard?: boolean) {
if (isGraphItemRefContext(item, 'branch')) {
const { ref } = item.webviewItemValue;
let remote;
if (ref.remote) {
remote = getRemoteNameFromBranchName(ref.name);
} else if (ref.upstream != null) {
remote = getRemoteNameFromBranchName(ref.upstream.name);
}
return executeCommand<OpenOnRemoteCommandArgs>(Commands.OpenOnRemote, {
repoPath: ref.repoPath,
resource: {
type: RemoteResourceType.Branch,
branch: ref.name,
},
remote: ref.upstream?.name,
remote: remote,
clipboard: clipboard,
});
}

正在加载...
取消
保存