Add config option for listing worktrees for bare repositories #166
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#143 redone on top of latest main,
which actually means that not much was kept since quite a bit has changed since then :)
Because jj doesn't store the location of workspaces, and with the option enabled we'd be
checking workspaces of all repos, without any optimizations the existing solution was very
slow since for each repo we'd go over all configured search paths and look for jj workspaces.
There are discussions on it, so in the future jj might actually know the locations of
workspaces, and then this will become obsolete, but for now I tried to optimize it by first
gathering a list of all workspace names (these are known by jj), and then seeing if all of
them could be found inside of the current repo's directory (if bare). If not, we'd go back to
scanning all search paths again. (So there's probably still some room for optimizations).
But in the case of having no workspaces at all, neither of these things will be done.
I don't know if the number of repos I have is anything close to representative, so I'd be
glad for some testing and reports of how this performs :)