Skip to content

git_worktree_lookup returns GIT_ERROR instead of GIT_ENOTFOUND for a non-existing worktree #6366

@arroz

Description

@arroz

Reproduction steps

Call git_worktree_lookup with a name that does not match the internal name of any existing worktree.

Expected behavior

An error code of GIT_ENOTFOUND should be returned.

Actual behavior

An error code of GIT_ERROR is returned instead.

Version of libgit2 (release number or SHA1)

Current main (22f3825 at time of writing).

Operating system(s) tested

macOS but should happen on any OS.

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