You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
active_branch is detected incorrectly when using reftable #2113
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.
While the object database with SHA256 should be fine, the reference handling will have a problem as it's currently done in pure python.
To support this properly, I think it would have to detect reftables and switch to an alternative implementation, probably one that just uses Git under the hood.
Is there a shorter-term option perhaps to add the detection and just error loudly? I realise that full native reftables support may be a longer-term project.
On git repositories using the new reftable format (slated to become the default in the upcoming Git 3.0.0)...
Also worth noting that reftables may already be widely used on macos where a case-insensitive filesystem is the default - due to git suggesting that users migrate if it detects a case-sensitivity conflict:
error: You're on a case-insensitive filesystem, and the remote you are
trying to fetch from has references that only differ in casing. It
is impossible to store such references with the 'files' backend. You
can either accept this as-is, in which case you won't be able to
store all remote references on disk. Or you can alternatively
migrate your repository to use the 'reftable' backend with the
following command:
git refs migrate --ref-format=reftable
Please keep in mind that not all implementations of Git support this
new format yet. So if you use tools other than Git to access this
repository it may not be an option to migrate to reftables.
Was caught by this recently when using repo.index.diff("HEAD") to detect a changeset.
Activity
Byron commentedon Mar 19, 2026
While the object database with SHA256 should be fine, the reference handling will have a problem as it's currently done in pure python.
To support this properly, I think it would have to detect reftables and switch to an alternative implementation, probably one that just uses Git under the hood.
alynn-coefficient commentedon Mar 20, 2026
Is there a shorter-term option perhaps to add the detection and just error loudly? I realise that full native reftables support may be a longer-term project.
planetmarshall commentedon Apr 1, 2026
Also worth noting that reftables may already be widely used on macos where a case-insensitive filesystem is the default - due to git suggesting that users migrate if it detects a case-sensitivity conflict:
Was caught by this recently when using
repo.index.diff("HEAD")to detect a changeset.