git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/2] worktree: add CLI/config options for relative path linking

From
Caleb White <cdwhite3@pm.me>
Date
Oct 28, 2024, 16:35 UTC
Message-ID
<D57L2P544W08.2MHA3Q38UBPEO@pm.me>
In-Reply-To
<Zx7cKN9X56GrHrU/@nand.local>
On Sun Oct 27, 2024 at 7:34 PM CDT, Taylor Blau wrote:
Show 19 quoted lines
> Additionally, it appears that this patch breaks at least t0001-init.sh,
> but others as well. The relevant portion of -vx from t0001.46 is:
>
>     --- 8< ---
>     + git -C mainwt config worktree.useRelativePaths true
>     + git -C mainwt worktree add --detach ../linkwt
>     Preparing worktree (detached HEAD 89e2b84)
>     HEAD is now at 89e2b84 gumby
>     + git -C mainwt init --separate-git-dir ../seprepo
>     Reinitialized existing Git repository in /home/ttaylorr/src/git/t/trash directory.t0001-init/seprepo/
>     + git -C mainwt rev-parse --git-common-dir
>     fatal: repo version is 0, but v1-only extension found:
>       relativeworktrees
>     --- >8 ---
>
> Let's please fix this breakage, and then decide what we are going to do
> with the extension in the second patch relatively soon, as I worry that
> putting the original topic on master may have been a mistake if it is
> going to break worktree pruning on earlier Git versions.

Thanks for catching this, the issue is that there's a bug in the `initialize_repository_version()` function when reinitializing a repository---the function doesn't check if there are other extensions in use before downgrading the repository version to 0.

This is a rare edge case, but I'll work on a fix.

Best, Caleb

Previous: Taylor BlauNext: Taylor Blau
Message 5 of 14 in “Allow relative worktree linking to be configured by the user”
  1. 0/2 Allow relative worktree linking to be configured by the userCaleb White, Oct 25, 2024
  2. 1/2 worktree: add CLI/config options for relative path linkingCaleb White, Oct 25, 2024
  3. Taylor BlauOct 28, 2024
  4. Taylor BlauOct 28, 2024
  5. Caleb WhiteOct 28, 2024
  6. Taylor BlauOct 28, 2024
  7. Caleb WhiteOct 28, 2024
  8. Caleb WhiteOct 28, 2024
  9. 2/2 worktree: add `relativeWorktrees` extensionCaleb White, Oct 25, 2024
  10. Taylor BlauOct 28, 2024
  11. Caleb WhiteOct 28, 2024
  12. Taylor BlauOct 28, 2024
  13. Caleb WhiteOct 28, 2024
  14. Taylor BlauOct 28, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.