Title: PushInfo is documented to return a local reference, but a pushed commit need not be a reference · Issue #1624 · gitpython-developers/GitPython · GitHub
Open Graph Title: PushInfo is documented to return a local reference, but a pushed commit need not be a reference · Issue #1624 · gitpython-developers/GitPython
X Title: PushInfo is documented to return a local reference, but a pushed commit need not be a reference · Issue #1624 · gitpython-developers/GitPython
Description: Hi! It is a perhaps little known fact that one can use git push to push something that is not a reference, with syntax like git push 1a2b3c4d:refs/heads/remotebranch This is possible with GitPython, but subtly broken. The Repo.push() com...
Open Graph Description: Hi! It is a perhaps little known fact that one can use git push to push something that is not a reference, with syntax like git push 1a2b3c4d:refs/heads/remotebranch This is possible with GitPython...
X Description: Hi! It is a perhaps little known fact that one can use git push to push something that is not a reference, with syntax like git push 1a2b3c4d:refs/heads/remotebranch This is possible with GitPython...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1624
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PushInfo is documented to return a local reference, but a pushed commit need not be a reference","articleBody":"Hi!\r\n\r\nIt is a perhaps little known fact that one can use `git push` to push something that is not a reference, with syntax like\r\n\r\ngit push 1a2b3c4d:refs/heads/remotebranch\r\n\r\nThis is possible with GitPython, but subtly broken. The Repo.push() command technically succeeds, but returns a zero-length array and no errors.\r\n\r\nThis is because when building a PushInfo struct, GitPython expects the local commit that is pushed to be a reference, and this is not always true. When unable to convert the local commit into a reference, GitPython simply gives up and doesn't build that PushInfo.\r\n\r\nFixing this would be relatively trivial, and I'd love to submit the patch to do it (props, by the way, for writing very straightforward and readable code.) The trouble is that this specific detail is documented:\r\n\r\n```\r\ninfo.local_ref # Reference pointing to the local reference that was pushed\r\n # It is None if the ref was deleted.\r\n```\r\n\r\nand any change we do here would imply breaking the API. How should we deal with this? I'd be glad to implement whatever solution is decided on.","author":{"url":"https://github.com/zfigura","@type":"Person","name":"zfigura"},"datePublished":"2023-07-29T18:39:04Z","url":"https://github.com/gitpython-developers/GitPython/issues/1624"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:27c5a9a8-ba49-b015-858c-999ebb44003d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D6F2:3DEF55:1EEF38D:28C37B1:6B068A8E |
| html-safe-nonce | b4e794a81c376814de3000104cceaa14d909b396642edcfbf1820ae8031a4194 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENkYyOjNERUY1NToxRUVGMzhEOjI4QzM3QjE6NkIwNjhBOEUiLCJ2aXNpdG9yX2lkIjoiMzE0NDYyNzM5MDY1NjE4NzAyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fbaac653a9b46897d431c599f2c59c059571b4a5ce94c772955250f05f7dea9c |
| hovercard-subject-tag | issue:1827594671 |
| 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/1624/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9b7c27d4f3f843c2589a5de81ecc933d725dca6dab1f5f402b987f6e8e4173b7/gitpython-developers/GitPython/issues/1624 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9b7c27d4f3f843c2589a5de81ecc933d725dca6dab1f5f402b987f6e8e4173b7/gitpython-developers/GitPython/issues/1624 |
| og:image:alt | Hi! It is a perhaps little known fact that one can use git push to push something that is not a reference, with syntax like git push 1a2b3c4d:refs/heads/remotebranch This is possible with GitPython... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zfigura |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| 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 | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width