FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Make remote#download async by tbranyen · Pull Request #326 · nodegit/nodegit · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .js  (1) .json  (1) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
11 changes: 11 additions & 0 deletions generate/input/descriptor.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -1115,6 +1115,17 @@
"remote": {
"cType": "git_remote",
"functions": {
"git_remote_connect": {
"return": {
"isErrorCode": true
}
},
"git_remote_download": {
"isAsync": true,
"return": {
"isErrorCode": true
}
},
"git_remote_default_branch": {
"ignore": true
},
Expand Down
13 changes: 5 additions & 8 deletions test/tests/remote.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,12 @@ describe("Remote", function() {
it("can download from a remote", function() {
var repo = this.repository;

return Remote.load(repo, "origin")
.then(function(remote) {
return repo.getRemote("origin").then(function(remote) {
remote.checkCert(0);

remote.connect(NodeGit.Enums.DIRECTION.FETCH);

return remote.download();
})
.then(function() {
assert(true);
}, function() {
assert(false);
});
});

Expand All @@ -114,7 +111,7 @@ describe("Remote", function() {
it("can fetch from all remotes", function() {
// Set a reasonable timeout here for the fetchAll test
this.timeout(15000);

return this.repository.fetchAll({
credentials: function(url, userName) {
return NodeGit.Cred.sshKeyFromAgent(userName);
Expand Down

Back | FazBrowse Home | New Git URL