Re: [PATCH v4 2/8] worktree: add `relativeWorktrees` extension
- From
Caleb White <cdwhite3@pm.me>
- Date
- Nov 20, 2024, 05:13 UTC
- Message-ID
- <D5QQZ2X595GX.2FRO57TTXZ548@pm.me>
- In-Reply-To
- <47f2b6bf-1e10-4b01-8365-467cc5ca7779@gmail.com>
On Tue Nov 19, 2024 at 9:07 AM CST, Phillip Wood wrote:
Show 9 quoted lines
> On 01/11/2024 04:38, Caleb White wrote: >> A new extension, `relativeWorktrees`, is added to indicate that at least >> one worktree in the repository has been linked with relative paths. > > Out of interest what happens in the later patches if we add a worktree > with a relative path which sets this extension and then convert it to an > absolute path? Will we clear this extension or do we leave it set? I'm > mainly curious, I don't think it's the end of the world if we leave the > extension set.
The extension would remain set. I was going to try and unset the extension, but it is only safe to do that if all worktrees use absolute (meaning they would all need to be checked) and I decided it wasn't that important. I suppose the check could be added in the `repair_worktrees()` function during `git worktree repair` if it is deemed important.
Best,
Caleb