Title: Lookup a non existent commit crashes the process. · Issue #353 · nodegit/nodegit · GitHub
Open Graph Title: Lookup a non existent commit crashes the process. · Issue #353 · nodegit/nodegit
X Title: Lookup a non existent commit crashes the process. · Issue #353 · nodegit/nodegit
Description: I am doing some analysis of a codebase over time using nodegit, I am getting commits from an outside source that may no longer exist. Doing Commit.lookup says it should be safe, but if I do a lookup with an invalid commit (but a full sha...
Open Graph Description: I am doing some analysis of a codebase over time using nodegit, I am getting commits from an outside source that may no longer exist. Doing Commit.lookup says it should be safe, but if I do a looku...
X Description: I am doing some analysis of a codebase over time using nodegit, I am getting commits from an outside source that may no longer exist. Doing Commit.lookup says it should be safe, but if I do a looku...
Opengraph URL: https://github.com/nodegit/nodegit/issues/353
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lookup a non existent commit crashes the process.","articleBody":"I am doing some analysis of a codebase over time using nodegit, I am getting commits from an outside source that may no longer exist.\n\nDoing `Commit.lookup` says it should be safe, but if I do a lookup with an invalid commit (but a full sha), I get the following error:\n\n```\ngood repo\n[Error: Object not found - failed to find pack entry (b5e13cc50f98d9a045bebadffacf396b9ee49ad5)]\nnode(16924,0x7fff73d77300) malloc: *** error for object 0x100d02be0: pointer being freed was not allocated\n*** set a breakpoint in malloc_error_break to debug\n```\n\nHere is some example code that causes the failure:\n\n``` JavaScript\nvar nodegit = require(\"nodegit\")\nvar Repo = nodegit.Repository\nvar Commit = nodegit.Commit\n\nRepo.open(\"/path/to/myrepo\").then(function(repo) {\n console.log(\"good repo\")\n // missing, but valid full length, sha\n return Commit.lookup(repo, \"b5e13cc50f98d9a045bebadffacf396b9ee49ad5\").then(function(commit) {\n console.log(commit.message())\n }, function(err) { console.log(err); throw err})\n}, function(err) { console.log(err); throw err })\n\n\n```\n","author":{"url":"https://github.com/addisonj","@type":"Person","name":"addisonj"},"datePublished":"2015-01-15T20:27:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/353/nodegit/issues/353"}
| 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:26536cdc-a0bd-a17b-4c89-95e1315b3383 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99EC:2E1F49:33304D9:42D4419:6A5CE6C6 |
| html-safe-nonce | ca10bf7ae22254b1d780e0e59f56f9310e5dff941f94a93b3d16319bbb9adf75 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUVDOjJFMUY0OTozMzMwNEQ5OjQyRDQ0MTk6NkE1Q0U2QzYiLCJ2aXNpdG9yX2lkIjoiOTU0OTA3ODA3MzUwMzE4NzkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | cc8c3e114b832bff458f9d9a4fae132df7d5dfdcd0dc7259908ff96c00a4eaf9 |
| hovercard-subject-tag | issue:54499748 |
| 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/nodegit/nodegit/353/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b9c213c13b85b74bde8032d5576860de82cd67fba24a8f84f9c4a0c45d29cf9/nodegit/nodegit/issues/353 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b9c213c13b85b74bde8032d5576860de82cd67fba24a8f84f9c4a0c45d29cf9/nodegit/nodegit/issues/353 |
| og:image:alt | I am doing some analysis of a codebase over time using nodegit, I am getting commits from an outside source that may no longer exist. Doing Commit.lookup says it should be safe, but if I do a looku... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | addisonj |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| 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