Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

active_branch is detected incorrectly when using reftable #2113

Copy link
Copy link
@alynn-coefficient

Description

@alynn-coefficient
Issue body actions

On git repositories using the new reftable format (slated to become the default in the upcoming Git 3.0.0), GitPython detects the wrong ref as being active.

Observe, with the traditional "files" format:

mkdir test
cd test
git init --ref-format=files
uvx --with gitpython python -c "import git; print(git.Repo('.').active_branch.name)"

Produces main as expected. However:

mkdir test
cd test
git init --ref-format=reftable
uvx --with gitpython python -c "import git; print(git.Repo('.').active_branch.name)"

Produces .invalid.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.