Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Link workspaces with relative paths #5913

Open
calebdw opened this issue Mar 7, 2025 · 0 comments
Open

FR: Link workspaces with relative paths #5913

calebdw opened this issue Mar 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@calebdw
Copy link
Member

calebdw commented Mar 7, 2025

Hello!

For large volume repositories (like my main work repo), I've taken to using git worktrees in conjunction with a bare repository to quickly switch contexts without having to worry about stashing/committing, etc. The bare repository is used so that everything is self contained inside a single directory and I don't have worktrees intermingled with the main working tree files.

For a given repository (e.g., devops), the directory structure looks like:

.
└── devops
    ├── .git (bare)
    ├── develop
    ├── ...
    └── master

This works great, but until v2.48 git linked worktrees with absolute paths which meant that this devops directory could not be moved without breaking all the worktrees, despite everything being self contained inside the directory. It also meant that the worktrees couldn't be mapped inside containerized environments as the absolute path differed. To solve this, I contributed a patch series that allowed worktrees to be linked with relative paths.

It would be great if jj's workspaces could also be linked with relative paths as they suffer from the same limitations mentioned above.

Thanks!

@PhilipMetzger PhilipMetzger added the enhancement New feature or request label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants