diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index 4b70c8a..1d681f8 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -2207,13 +2207,14 @@ export class GraphWebview extends WebviewBase { } function formatRepositories(repositories: Repository[]): GraphRepository[] { - if (repositories.length === 0) return repositories; + if (repositories.length === 0) return []; return repositories.map(r => ({ formattedName: r.formattedName, id: r.id, name: r.name, path: r.path, + isVirtual: r.provider.virtual, })); } diff --git a/src/plus/webviews/graph/protocol.ts b/src/plus/webviews/graph/protocol.ts index ab90fbe..d0a4301 100644 --- a/src/plus/webviews/graph/protocol.ts +++ b/src/plus/webviews/graph/protocol.ts @@ -83,6 +83,7 @@ export interface GraphRepository { id: string; name: string; path: string; + isVirtual: boolean; } export interface GraphCommitIdentity { diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index e0076e1..1a2e2cd 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -872,39 +872,50 @@ export function GraphWrapper({ - - Show All Local Branches - + {repo?.isVirtual !== true && ( + + Show All Local Branches + + )} Show Current Branch Only - - - Hide Remote Branches - - - - - Hide Stashes - - + {repo?.isVirtual !== true && ( + <> + + + Hide Remote Branches + + + + + Hide Stashes + + + + )}