Title: `active_branch` is detected incorrectly when using `reftable` · Issue #2113 · gitpython-developers/GitPython · GitHub
Open Graph Title: `active_branch` is detected incorrectly when using `reftable` · Issue #2113 · gitpython-developers/GitPython
X Title: `active_branch` is detected incorrectly when using `reftable` · Issue #2113 · gitpython-developers/GitPython
Description: 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-...
Open Graph Description: 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" fo...
X Description: 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 "file...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/2113
X: @github
Domain: redirect.github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`active_branch` is detected incorrectly when using `reftable`","articleBody":"On git repositories using the new [`reftable`][reftable] format (slated to [become the default][reftable-default] in the upcoming Git 3.0.0), GitPython detects the wrong ref as being active.\n\nObserve, with the traditional \"files\" format:\n\n```bash\nmkdir test\ncd test\ngit init --ref-format=files\nuvx --with gitpython python -c \"import git; print(git.Repo('.').active_branch.name)\"\n```\n\nProduces `main` as expected. However:\n\n```bash\nmkdir test\ncd test\ngit init --ref-format=reftable\nuvx --with gitpython python -c \"import git; print(git.Repo('.').active_branch.name)\"\n```\n\nProduces `.invalid`.\n\n[reftable]: https://git-scm.com/docs/reftable\n[reftable-default]: https://git-scm.com/docs/BreakingChanges","author":{"url":"https://github.com/alynn-coefficient","@type":"Person","name":"alynn-coefficient"},"datePublished":"2026-03-19T19:54:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2113/GitPython/issues/2113"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0724e298-792f-4fb4-f13a-e4027e359a8f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A3BE:390DDA:2777CF:3775CF:6A5516AD |
| html-safe-nonce | 82d0134f427defd068c1d73611af7d7f9027889be1a2837872af46ee2631b23e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0JFOjM5MEREQToyNzc3Q0Y6Mzc3NUNGOjZBNTUxNkFEIiwidmlzaXRvcl9pZCI6Ijg1MTcwMTI5MzgyMjU0MjQwNDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1ba5b8011c60cda7cb9f1459d75634bbe0732b3809b96bc7d646eea952a7c8a2 |
| hovercard-subject-tag | issue:4103910381 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gitpython-developers/GitPython/2113/issue_layout |
| twitter:image | https://opengraph.githubassets.com/355dbcc8891c39372d7d3a828c8ab81200e5873f862774fd083787318399329d/gitpython-developers/GitPython/issues/2113 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/355dbcc8891c39372d7d3a828c8ab81200e5873f862774fd083787318399329d/gitpython-developers/GitPython/issues/2113 |
| og:image:alt | 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" fo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alynn-coefficient |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width