Skip to content

"Workspace settings" are lost when switching between worktrees #1956

@ELLIOTTCABLE

Description

@ELLIOTTCABLE

Issue Type: Bug

I just upgraded to GitLens Pro, specifically for worktree-support.

However, I use a lot of workspace-scoped settings. When you use GitLens's features to "switch" to another worktree, you're effectively changing workspaces, as far as VScode is concerned. This means all of the workspace-specific settings are reset to their default values.

My current workaround is pretty nasty: I save the workspace as a file, and every time I create a new worktree, I duplicate the .code-workspace file for the original worktree, and update the paths stored in it. It's a pretty gross and manual process, though; so it'd be super-awesome if GitLens would automate it.

Extension version: 12.0.5
VS Code version: Code 1.66.0 (e18005f0f1b33c29e81d732535d8c0e47cafb0b5, 2022-03-30T05:49:37.118Z)
OS version: Darwin arm64 21.4.0
Restricted Mode: No
Remote OS version: Linux x64 5.8.0-0.bpo.2-amd64
Remote OS version: Linux x64 5.8.0-0.bpo.2-amd64

System Info
Item Value
CPUs Apple M1 Pro (10 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 4, 5, 5
Memory (System) 16.00GB (0.06GB free)
Process Argv --crash-reporter-id ddb5da65-4654-412e-9dc3-738998ade011
Screen Reader no
VM 0%
Item Value
Remote SSH: febox3
OS Linux x64 5.8.0-0.bpo.2-amd64
CPUs AMD EPYC 7413 24-Core Processor (48 x 2298)
Memory (System) 502.99GB (11.55GB free)
VM 0%
Item Value
Remote SSH: febox3
OS Linux x64 5.8.0-0.bpo.2-amd64
CPUs AMD EPYC 7413 24-Core Processor (48 x 2298)
Memory (System) 502.99GB (11.55GB free)
VM 0%

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-worktreesIssues or features related to worktreesunder-discussionBeing considered or is under active discussion

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions