Title: git_diff_from_buffer: there is no initialization of git_diff_options version · Issue #4158 · libgit2/libgit2 · GitHub
Open Graph Title: git_diff_from_buffer: there is no initialization of git_diff_options version · Issue #4158 · libgit2/libgit2
X Title: git_diff_from_buffer: there is no initialization of git_diff_options version · Issue #4158 · libgit2/libgit2
Description: Reproduction steps git_patch *patch; git_diff_options diffOpts; git_diff_init_options(&diffOpts, GIT_DIFF_OPTIONS_VERSION); diffOpts.flags |= GIT_DIFF_FORCE_BINARY | GIT_DIFF_SHOW_BINARY; git_patch_from_buffers(patch, "i am object before...
Open Graph Description: Reproduction steps git_patch *patch; git_diff_options diffOpts; git_diff_init_options(&diffOpts, GIT_DIFF_OPTIONS_VERSION); diffOpts.flags |= GIT_DIFF_FORCE_BINARY | GIT_DIFF_SHOW_BINARY; git_patch...
X Description: Reproduction steps git_patch *patch; git_diff_options diffOpts; git_diff_init_options(&diffOpts, GIT_DIFF_OPTIONS_VERSION); diffOpts.flags |= GIT_DIFF_FORCE_BINARY | GIT_DIFF_SHOW_BINARY; git_p...
Opengraph URL: https://github.com/libgit2/libgit2/issues/4158
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git_diff_from_buffer: there is no initialization of git_diff_options version","articleBody":"### Reproduction steps\r\n```cpp\r\n\tgit_patch *patch;\r\n\tgit_diff_options diffOpts;\r\n git_diff_init_options(\u0026diffOpts, GIT_DIFF_OPTIONS_VERSION);\r\n\tdiffOpts.flags |= GIT_DIFF_FORCE_BINARY | GIT_DIFF_SHOW_BINARY;\r\n\tgit_patch_from_buffers(patch, \"i am object before\", 19, \"obj1\", \"i am object after\", 18, \"obj1\", \u0026diffOpts);\r\n git_buf *buff;\r\n git_patch_to_buf(buff, patch);\r\n git_diff *diff;\r\n git_diff_from_buffer(diff, buf-\u003eptr, buf-\u003esize);\r\n git_diff_print(diff, GIT_DIFF_FORMAT_PATCH, DiffPrintCB, NULL);\r\n```\r\n### Expected behavior\r\nPrint diff\r\n### Actual behavior\r\nerror: invalid version 0 on git_diff_options\r\n\r\n### Version of libgit2 (release number or SHA1)\r\nv0.25 + 1\r\n### Operating system(s) tested\r\nwindows 10","author":{"url":"https://github.com/gumenikav","@type":"Person","name":"gumenikav"},"datePublished":"2017-03-13T13:21:59.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/4158/libgit2/issues/4158"}
| 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:fc391126-c59a-282d-1ebe-56ab70ec0caa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B3EE:3FD786:339F7A6:45BAC65:6A5DD0E8 |
| html-safe-nonce | b48de80add1a5a3b6acfd64624fe0dc840aa318e098595bcf522428adcd8cd3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCM0VFOjNGRDc4NjozMzlGN0E2OjQ1QkFDNjU6NkE1REQwRTgiLCJ2aXNpdG9yX2lkIjoiNzg5MTAxNzIxOTk5NjI0MjE1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 12b0a185fc43be09a7db73312c9a206a20edaee13c9c23fe3074e8bdeb9b2a51 |
| hovercard-subject-tag | issue:213764575 |
| 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/libgit2/libgit2/4158/issue_layout |
| twitter:image | https://opengraph.githubassets.com/63adee0a23cb7e968a944b0d7fdb1d078bc4b0aec37e1fa781148303aec42fff/libgit2/libgit2/issues/4158 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/63adee0a23cb7e968a944b0d7fdb1d078bc4b0aec37e1fa781148303aec42fff/libgit2/libgit2/issues/4158 |
| og:image:alt | Reproduction steps git_patch *patch; git_diff_options diffOpts; git_diff_init_options(&diffOpts, GIT_DIFF_OPTIONS_VERSION); diffOpts.flags |= GIT_DIFF_FORCE_BINARY | GIT_DIFF_SHOW_BINARY; git_patch... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gumenikav |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| 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 |
| disable-turbo | false |
| 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