Skip to content

Commit 6decdd1

Browse files
John Haleymaxkorp
authored andcommitted
Updated fetch example to use remote shortcut
1 parent b5cddd2 commit 6decdd1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

example/fetch.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ var nodegit = require('../');
22
var path = require('path');
33

44
nodegit.Repository.open(path.resolve(__dirname, '../.git')).then(function(repo) {
5-
return nodegit.Remote.load(repo, "origin");
6-
}).then(function(remote) {
7-
remote.connect(0);
8-
return remote.download();
5+
return repo.fetch("origin");
96
})
107
.done(function() {
118
console.log("It worked!");

0 commit comments

Comments
 (0)