Replies: 1 comment 4 replies
-
|
I believe there is no reference from the repository to where each workspace is located on disk. The workspace only refers back to the repository. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
I need to use workspaces more these days, and I thought I'd write some helper shell fns to fit my workflow of making sibling workspaces.
The problem came when trying to write some workspace directory-switching functionality.
Is there any way to get a list of directories that the workspaces were created in, or are currently associated with?
jj workspace listhas no associated directory info.jj rootalways show the current workspace root.Likewise, from a given directory, is there a way to figure out which workspace you're in?
I'm not averse to poking around in the guts of .jj/.git if that's the solution, but I'd rather not.
Example
Say you have a
~/code/jjrepodirectory that's the default workspace. and sibling workspaces calledsibling1in~/code/jjrepo-sibling1,sibling2in~/code/jjrepo-sibling2, etc.I'm trying to write code like
jj-worksibling.sh switch sibling1, orjj-worksibling.sh switch defaultthat will work from any workspace's directory.Beta Was this translation helpful? Give feedback.
All reactions