Skip to content

Conversation

nguyenchristy
Copy link
Contributor

'Compare with Workspace' is only available from a worktree's context menu under 'Changes' and opens the merge editor where users can apply changes from a worktree to its main repository.
Screenshot 2025-08-28 164553

image

@@ -182,6 +182,7 @@ export class Resource implements SourceControlResourceState {
get type(): Status { return this._type; }
get original(): Uri { return this._resourceUri; }
get renameResourceUri(): Uri | undefined { return this._renameResourceUri; }
get contextValue(): string | undefined { return this._repository?.kind; }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this being used?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the package.json where I set scmResourceState == worktree
https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.d.ts#L16389

@nguyenchristy nguyenchristy enabled auto-merge (squash) August 29, 2025 16:09
@@ -310,6 +311,7 @@ export class Resource implements SourceControlResourceState {
private _type: Status,
private _useIcons: boolean,
private _renameResourceUri?: Uri,
private _repository?: Repository,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. Let's not pass in the complete repository object but just pass in the repository kind (similar to how the ResourceGroupType is being passed in.

Copy link
Contributor Author

@nguyenchristy nguyenchristy Sep 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. Lmk if you'd eventually like to make RepositoryKind an enum. I just didn't do it here because I didn't want to make a bigger change than necessary to other files.

@nguyenchristy nguyenchristy merged commit f562c9d into main Sep 2, 2025
18 checks passed
@nguyenchristy nguyenchristy deleted the cnguyen/wt-diff branch September 2, 2025 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants