Skip to content

Case-sensitivity bug in extension validation rejects worktreeConfig #1939

@migmartri

Description

@migmartri

Bug Description

In v5.17.0 (#1861), repository_extensions.go lowercases extension names via strings.ToLower in the extensions() function, but extensionsValidForV0 uses mixed-case keys ("worktreeConfig", "partialClone", "preciousObjects"). Since Go map lookups are case-sensitive, the lowercased names never match the allowlist.

Additionally, worktreeConfig is missing from builtinExtensions, so it also fails for repositoryFormatVersion=1 repos via ErrUnknownExtension.

This breaks PlainOpen on any repository using git worktree (which sets extensions.worktreeConfig = true

opening repository: core.repositoryformatversion does not support extension: worktreeconfig

see chainloop-dev/chainloop#2966

go-git Version

v5.17.0

Steps to Reproduce

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingduplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions