← Winnitude! Search  ·  Reader Mode (876 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 14 LINKS

`active_branch` is detected incorrectly when using `reftable` · Issue #2113 · gitpython-developers/GitPython

Repository navigation

active_branch is detected incorrectly when using reftable  #2113


New issue

New issue

Closed
#2114
Closed
active_branch is detected incorrectly when using reftable #2113 #2114 Labels
acknowledged

help wanted

Description

@alynn-coefficient's profile alynn-coefficient opened on Mar 19, 2026

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.

Metadata

Metadata

Assignees

No one assigned

    Labels


    acknowledged

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions