libgit2 doesn't support relative worktrees (as per git >= 2.48) · Issue #7210 · libgit2/libgit2 · GitHub
Skip to content

libgit2 doesn't support relative worktrees (as per git >= 2.48) #7210

Closed

Description

@schmerg

Git supports worktrees specified with relative rather than absolute paths (handy where the same device may be mounted differently, WSL and Windows shared use etc) since about git v2.48 (https://github.com/git/git/blob/cf6f63ea6bf35173e02e18bdc6a4ba41288acff9/Documentation/RelNotes/2.48.0.adoc?plain=1#L57)

https://git-scm.com/docs/git-config

relativeWorktrees
If enabled, indicates at least one worktree has been linked with relative paths. Automatically set if a worktree has been created or repaired with either the --relative-paths option or with the worktree.useRelativePaths config set to true.

But as of 1.91 libgit2 fails with "unsupported extension name extensions.relativeworktrees" if this feature is used

See report of this issue with libgit2 under nix for steps of how to reproduce

NixOS/nix#14987

Activity

  1. changed the title [-]libgit2 does support relative worktrees (as per git >= 2.48)[/-] [+]libgit2 doesn't support relative worktrees (as per git >= 2.48)[/+] on Feb 4, 2026
  2. added a commit that references this issue on May 12, 2026
    3d1e458
  3. schmerg commented on May 12, 2026

    @schmerg
    Author

    Thanks @cwill747 @ethomson ... much appreciated

  4. willieseabrook commented on May 17, 2026

    @willieseabrook

    Thanks for this. The issue was breaking my nix setup.

    So now just a matter of waiting for the next libgit2 release so it can flow through to nix.

  5. added 2 commits that reference this issue on May 20, 2026
    b663538
    0516d66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions