Title: refs: do not use peeled OID if peeling to a tag by pks-t · Pull Request #4367 · libgit2/libgit2 · GitHub
Open Graph Title: refs: do not use peeled OID if peeling to a tag by pks-t · Pull Request #4367 · libgit2/libgit2
X Title: refs: do not use peeled OID if peeling to a tag by pks-t · Pull Request #4367 · libgit2/libgit2
Description: If a reference stored inside of the packed-refs file does not directly point to a commit object, it will always have a fully-peeled value pointing to the underlying commit object. If we peel a reference to an object, we will use that peeled value to speed up resolving the object. This works as intended for all objects, except for annotated tags. As a reference for an annotated tag does not directly point to the commit but instead to the tag object, the packed-refs file will have an accomodating fully-peeled object ID pointing to the commit of that tag. When we use that fully-peeled OID pointing to that commit, though, we obviously cannot peel that to the tag anymore. Fix this issue by not using the fully-peeled OID whenever we want to peel to a tag. Note that this does not include the case where we want to resolve to any object type. Existing code may make use from the fact that we resolve those to commit objects instead of tag objects, even though that behaviour is inconsistent between packed and loose references. Furthermore, some tests of ours make the assumption that we in fact resolve those references to a commit.
Open Graph Description: If a reference stored inside of the packed-refs file does not directly point to a commit object, it will always have a fully-peeled value pointing to the underlying commit object. If we peel a refe...
X Description: If a reference stored inside of the packed-refs file does not directly point to a commit object, it will always have a fully-peeled value pointing to the underlying commit object. If we peel a refe...
Opengraph URL: https://github.com/libgit2/libgit2/pull/4367
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5517e7f4-519b-633b-7732-a1446dee535d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 89F2:35F5B8:42532E0:5786583:6A5D6553 |
| html-safe-nonce | 6ba3c2b6391d398f7418f99655e04f49ab4d4f782f6f327e7306feb089bd9974 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUYyOjM1RjVCODo0MjUzMkUwOjU3ODY1ODM6NkE1RDY1NTMiLCJ2aXNpdG9yX2lkIjoiMTIyMjYzNzQwNjk1MDA5MDA2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dc1cc1ec273751214055283d0e07e86fab29b452f44e718198141238167e06d3 |
| hovercard-subject-tag | pull_request:145109648 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/libgit2/libgit2/pull/4367/files |
| twitter:image | https://avatars.githubusercontent.com/u/4056630?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/4056630?s=400&v=4 |
| og:image:alt | If a reference stored inside of the packed-refs file does not directly point to a commit object, it will always have a fully-peeled value pointing to the underlying commit object. If we peel a refe... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git |
| octolytics-dimension-user_id | 394745 |
| octolytics-dimension-user_login | libgit2 |
| octolytics-dimension-repository_id | 901662 |
| octolytics-dimension-repository_nwo | libgit2/libgit2 |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 901662 |
| octolytics-dimension-repository_network_root_nwo | libgit2/libgit2 |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width