Title: One cause of "The reference 'refs/heads/master' cannot be peeled - Cannot retrieve reference target" · Issue #4293 · libgit2/libgit2 · GitHub
Open Graph Title: One cause of "The reference 'refs/heads/master' cannot be peeled - Cannot retrieve reference target" · Issue #4293 · libgit2/libgit2
X Title: One cause of "The reference 'refs/heads/master' cannot be peeled - Cannot retrieve reference target" · Issue #4293 · libgit2/libgit2
Description: I played with libgit2 and came around this error and debugged it a bit. In the end cmake found an ancient zlib header and lib burried in %PATH%. Here is a record of my findings in hope it may help. ERROR: Call to git_status_list_new() fa...
Open Graph Description: I played with libgit2 and came around this error and debugged it a bit. In the end cmake found an ancient zlib header and lib burried in %PATH%. Here is a record of my findings in hope it may help....
X Description: I played with libgit2 and came around this error and debugged it a bit. In the end cmake found an ancient zlib header and lib burried in %PATH%. Here is a record of my findings in hope it may help....
Opengraph URL: https://github.com/libgit2/libgit2/issues/4293
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"One cause of \"The reference 'refs/heads/master' cannot be peeled - Cannot retrieve reference target\"","articleBody":"_I played with libgit2 and came around this error and debugged it a bit. In the end cmake found an ancient zlib header and lib burried in %PATH%._\r\n\r\n_Here is a record of my findings in hope it may help._\r\n\r\n**ERROR**:\r\n\r\nCall to git_status_list_new() fails.\r\n\r\nMessage from git_reference_peel(): \"the reference 'refs/heads/master' cannot be peeled - Cannot retrieve reference target\"\r\n\r\n**ISSUE**:\r\n\r\nPrimary error message **overwritten**:\r\nMessage from inflate_disk_obj(): \"failed to inflate disk object\"\r\n\r\n**CAUSED BY**:\r\n\r\nstart_inflate(): inflateInit() returns 661 (?), inflate() then -6 (Z_VERSION_ERROR)\r\n\r\n**CAUSED BY**:\r\n\r\ncmake ..\r\n-- Found ZLIB: C:/gnuwin32/lib/zlib.lib (found version \"1.2.3\")\r\n\r\n**QUICK FIX**:\r\n\r\nDisable package searching in CMakeLists.txt:\r\n\r\n`#FIND_PACKAGE(ZLIB)`\r\n`#IF (ZLIB_FOUND)`\r\n`# INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS})`\r\n`# LINK_LIBRARIES(${ZLIB_LIBRARIES})`\r\n`# IF(APPLE OR CMAKE_SYSTEM_NAME MATCHES \"FreeBSD\")`\r\n`# LIST(APPEND LIBGIT2_PC_LIBS \"-lz\")`\r\n`# ELSE()`\r\n`# SET(LIBGIT2_PC_REQUIRES \"${LIBGIT2_PC_REQUIRES} zlib\")`\r\n`# ENDIF()`\r\n`#ELSE()`\r\n` MESSAGE(STATUS \"zlib was not found; using bundled 3rd-party sources.\" )`\r\n` INCLUDE_DIRECTORIES(deps/zlib)`\r\n` ADD_DEFINITIONS(-DNO_VIZ -DSTDC -DNO_GZIP)`\r\n` FILE(GLOB SRC_ZLIB deps/zlib/*.c deps/zlib/*.h)`\r\n`#ENDIF()`\r\n\r\n**SUGGESTED FIX**:\r\n\r\nAdd cmake option to disable package searching.","author":{"url":"https://github.com/dirk-de-bugger","@type":"Person","name":"dirk-de-bugger"},"datePublished":"2017-07-06T17:36:56.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/4293/libgit2/issues/4293"}
| 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:4afd31a0-5e11-4876-ee93-c2d31404cd16 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 909A:3F705B:6E1B639:973E4A8:6A5EA27A |
| html-safe-nonce | 18f5ab86b9e16dbd12833590762bbf977038535398a91b2ef15e4c987b682b24 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDlBOjNGNzA1Qjo2RTFCNjM5Ojk3M0U0QTg6NkE1RUEyN0EiLCJ2aXNpdG9yX2lkIjoiNzE5OTYzOTgyMDIwOTkyMjY4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a88fece867d9379f583eb1e09a02422b054709ac7b51126bb84c985166e31930 |
| hovercard-subject-tag | issue:241032158 |
| 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/4293/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e4c7daddf0a593379189af26bc3d12070908877456c178b363c921c624661bf0/libgit2/libgit2/issues/4293 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e4c7daddf0a593379189af26bc3d12070908877456c178b363c921c624661bf0/libgit2/libgit2/issues/4293 |
| og:image:alt | I played with libgit2 and came around this error and debugged it a bit. In the end cmake found an ancient zlib header and lib burried in %PATH%. Here is a record of my findings in hope it may help.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dirk-de-bugger |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| 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 | 2d2ac9bdd71d5f53f2b731c9330677e38624e301 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width