Title: Checkout's tree(*) function do not support Oid as a parameter by rcjsuen · Pull Request #1190 · nodegit/nodegit · GitHub
Open Graph Title: Checkout's tree(*) function do not support Oid as a parameter by rcjsuen · Pull Request #1190 · nodegit/nodegit
X Title: Checkout's tree(*) function do not support Oid as a parameter by rcjsuen · Pull Request #1190 · nodegit/nodegit
Description: The docs incorrectly spec that an Oid can be used as a treeish but the libgit2 git_checkout_tree API actually only supports "a commit, tag or tree". The following code will reproduce the problem. > node bug.js [Error: Object to checkout does not match repository] var git = require("nodegit"); git.Repository.open("myrepo") .then(function(repo) { return repo.getTagByName('v1.0.0').then(function(tag) { git.Checkout.tree(repo, tag.id(), { checkoutStrategy: git.Checkout.STRATEGY.SAFE_CREATE }) .then(function() { console.log("ok"); }).catch(function(err) { console.log(err); }); }); });
Open Graph Description: The docs incorrectly spec that an Oid can be used as a treeish but the libgit2 git_checkout_tree API actually only supports "a commit, tag or tree". The following code will reproduce the ...
X Description: The docs incorrectly spec that an Oid can be used as a treeish but the libgit2 git_checkout_tree API actually only supports "a commit, tag or tree". The following code will reprod...
Opengraph URL: https://github.com/nodegit/nodegit/pull/1190
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8820ddcb-0ae9-1009-370b-f1072d18aab3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8D26:337C5B:69D470E:91D3424:6A5E9525 |
| html-safe-nonce | b733ef0491bd9037cb064632901c563a130149e4d11a03d86323b559d119913d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDI2OjMzN0M1Qjo2OUQ0NzBFOjkxRDM0MjQ6NkE1RTk1MjUiLCJ2aXNpdG9yX2lkIjoiMTAyODI3NTMyNzc1ODkzMTIzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 378388eb538e0b3e316e6dd8465f0aae60aac5929e16e294210125d9d5e7d346 |
| hovercard-subject-tag | pull_request:101825064 |
| 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/nodegit/nodegit/pull/1190/files |
| twitter:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/15629116?s=400&v=4 |
| og:image:alt | The docs incorrectly spec that an Oid can be used as a treeish but the libgit2 git_checkout_tree API actually only supports "a commit, tag or tree". The following code will reproduce the ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| 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