Skip to content

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

@schmerg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions