Skip to content

git: git_branch returns an unknown branch_type as a successful result #4995

Closed

Description

@cliffhall

Problem

git_branch with a branch_type other than local, remote or all returns the text "Invalid branch type" as a normal result with isError: false.

Where it is pinned

src/git/tests/test_protocol.py: test_git_branch_unknown_type_is_not_an_error, added in #4974 (Wave 1 of #4857). Each of these tests carries a KNOWN BUG marker: it asserts the current, wrong behavior, so the fix has to change it.

Expected

An unknown branch_type is rejected as an error (isError: true), or by the input schema as an enum.

Done when

  • The behavior above is fixed, in the legacy-era (2025-11-25) server on SDK 1.x.
  • The pinning tests assert the correct behavior, and their KNOWN BUG markers are gone.
  • The per-file 90% coverage gate still passes.

Activity

  1. added this to the v2.0.0 milestone on Oct 4, 2026
  2. added
    bugSomething isn't working
    server-gitReference implementation for the Git MCP server - src/git
    on Oct 4, 2026
  3. self-assigned this
    on Oct 4, 2026
  4. cliffhall commented on Oct 5, 2026

    @cliffhall
    MemberAuthor

    Fixed by #5026, merged into v2/main (Wave 6 of #5004).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingserver-gitReference implementation for the Git MCP server - src/gitv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions