Title: Fetch does not really fetch · Issue #314 · nodegit/nodegit · GitHub
Open Graph Title: Fetch does not really fetch · Issue #314 · nodegit/nodegit
X Title: Fetch does not really fetch · Issue #314 · nodegit/nodegit
Description: As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch.. nodegit.Repository // Open the specified directory .open(directory).then(functio...
Open Graph Description: As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch.. nodegit.Repository // Open the specified...
X Description: As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch.. nodegit.Repository // Open t...
Opengraph URL: https://github.com/nodegit/nodegit/issues/314
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fetch does not really fetch","articleBody":"As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch..\n\n``` js\nnodegit.Repository\n\n // Open the specified directory\n .open(directory).then(function (repo) {\n _repository = repo;\n return nodegit.Remote.load(repo, \"origin\");\n //return repo.getRemote('origin');\n\n })\n // Fetch remote\n .then(function (remote) {\n remote.connect(0);\n return remote.download();\n\n //return remote.fetch(signature);\n })\n\n // Retrieve all references\n .then(function () {\n return _repository.getReferenceNames(nodegit.Reference.TYPE.ALL);\n })\n```\n\nAfter this there is a bunch of .then constructions to sort out which branches have been updated, etc... however I notice that nothing is changed/updated after running this fetch sequence. After performing a commandline 'git fetch' things have changed.\n\nI have also tried to npm install the latest checkout from nodegit/master and use the updated example which uses the 'remote shortcut'.\n\n``` js\nvar nodegit = require('../');\nvar path = require('path');\n\nnodegit.Repository.open(path.resolve(__dirname, '../.git')).then(function(repo) {\n return repo.fetch(\"origin\");\n})\n.done(function() {\n console.log(\"It worked!\");\n});\n```\n\nBut also this does not actually do a fetch (as in, no refs or files are updated).\n\nI hope I am missing something, either that or this is a bug.\n","author":{"url":"https://github.com/Athaphian","@type":"Person","name":"Athaphian"},"datePublished":"2014-12-04T17:54:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/314/nodegit/issues/314"}
| 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:e4aa4970-201a-df7f-c658-c916a091ba0b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B034:2AE2E2:3481BBE:443D11E:6A5CE6CD |
| html-safe-nonce | 5a680b0389300c54a35309e44bb32d45db6375e0e3f0092127c813dac0fa4ebc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDM0OjJBRTJFMjozNDgxQkJFOjQ0M0QxMUU6NkE1Q0U2Q0QiLCJ2aXNpdG9yX2lkIjoiMjI5NjQ2NzE0NDYzNTYzOTUwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bce5bbe368786ab5e6b59ea2827c5a3fce81fedb64acf76d4b226e4383df319b |
| hovercard-subject-tag | issue:51006513 |
| 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/314/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d46378fd733246bcc7bac86dd54093d8bd74685467469bcbae50b6668ec8ea1e/nodegit/nodegit/issues/314 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d46378fd733246bcc7bac86dd54093d8bd74685467469bcbae50b6668ec8ea1e/nodegit/nodegit/issues/314 |
| og:image:alt | As I'm trying to automate some of our git processes, I need to perform 'git fetch' programatically. However the 0.2.3 example does not actually do a fetch.. nodegit.Repository // Open the specified... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Athaphian |
| 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