Skip to content

[Schema Inaccuracy] incorrect ref parameter specification for ref deletion #3358

Closed

Description

@xmo-odoo

The parameter is currently documented as:

The commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.

The first one is definitely not true, using a sha as ref fails with a 422 (which itself is a strange return code, one would expect a 404 when trying to delete a ref which does not exist?)

I think the wording of the rest of the documentation, while strictly speaking correct, is also a bit misleading:

  • any ref can be deleted via this endpoint not just branches and tags
  • it gives the impression that ref can be a branch or tag name, which they can't (they have to be refnames)

The List matching references endpoints also lists commit SHA as valid refs to lookup. As far as I can tell that's not true, if a sha is passed in it'll be looked up like a normal ref (prefix-matched to the repository's actual refs), creating refs to a commit then passing that commit to the endpoint always returns a 200 with an empty list.

Activity

  1. nickfloyd commented on Nov 4, 2025

    @nickfloyd
    Contributor

    Please let us know if this work is still needed. We're trying to follow up on any older issues to make sure they get properly routed.

  2. xmo-odoo commented on Nov 10, 2025

    @xmo-odoo
    Author

    Seems to have been fixed in the meantime.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions