zielu / GitWorktree

Issue tracker for Git Worktree plugin
0 stars 0 forks source link

[BUG] Added Worktrees only show "Add Worktree" in context menu #5

Closed dhammond371 closed 4 months ago

dhammond371 commented 4 months ago

Describe the bug When I activate the context menu on one of the added worktree, the only available option is "Add Worktree." I am trying this is Webstorm version 241.14494.235 and Worktree version 1.0.1+231

To Reproduce

  1. Open IDE
  2. Open Git tab
  3. Open Worktree tab
  4. Add worktree
  5. Click OK
  6. right-click on added worktree

Expected behavior I would expect to be able to right-click on it to easilly change to it when needed.

Plugin version 1.0.1+231

IDE version WebStorm 2024.1 Build #WS-241.14494.235, built on March 27, 2024 Licensed to 1529530 Alberta Ltd. / Daniel Hammond Subscription is active until August 25, 2024. Runtime version: 17.0.10+8-b1207.12 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 6.5.0-27-generic GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 20 Non-Bundled Plugins: com.intellij.properties (241.14494.150) com.intellij.kubernetes (241.14494.150) com.intellij.ml.llm (241.14494.240) zielu.gitworktree (1.0.1+231) zielu.gittoolbox (500.2.3+233) izhangzhihao.rainbow.brackets (2024.2.2-241) Current Desktop: ubuntu:GNOME

Screenshots image image

zielu commented 4 months ago

Hi, based on screenshots it looks like you have all worktrees as sub-modules in one IDE project.

Worktrees view is structured in following way (adapting it to the screenshot):

The general assumption in the plugin is that each worktree is a separate IDE project and Open Worktree action switches between the projects (IDE windows in fact).

To make it work you would have to restructure directory layout into following:

It is assuming all these worktrees are based on single Git repository: /home/danielh/cco.

dhammond371 commented 4 months ago

Ok, thank you so much for your response.