Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc434a9

Browse files
committed
Merge pull requestnodegit#326 from nodegit/remote-download-async
Make remote#download async
2 parents684bec3 +3e1daae commitfc434a9

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

‎generate/input/descriptor.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,6 +1115,17 @@
11151115
"remote": {
11161116
"cType":"git_remote",
11171117
"functions": {
1118+
"git_remote_connect": {
1119+
"return": {
1120+
"isErrorCode":true
1121+
}
1122+
},
1123+
"git_remote_download": {
1124+
"isAsync":true,
1125+
"return": {
1126+
"isErrorCode":true
1127+
}
1128+
},
11181129
"git_remote_default_branch": {
11191130
"ignore":true
11201131
},

‎test/tests/remote.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,12 @@ describe("Remote", function() {
9191
it("can download from a remote",function(){
9292
varrepo=this.repository;
9393

94-
returnRemote.load(repo,"origin")
95-
.then(function(remote){
94+
returnrepo.getRemote("origin").then(function(remote){
95+
remote.checkCert(0);
96+
9697
remote.connect(NodeGit.Enums.DIRECTION.FETCH);
98+
9799
returnremote.download();
98-
})
99-
.then(function(){
100-
assert(true);
101-
},function(){
102-
assert(false);
103100
});
104101
});
105102

@@ -114,7 +111,7 @@ describe("Remote", function() {
114111
it("can fetch from all remotes",function(){
115112
// Set a reasonable timeout here for the fetchAll test
116113
this.timeout(15000);
117-
114+
118115
returnthis.repository.fetchAll({
119116
credentials:function(url,userName){
120117
returnNodeGit.Cred.sshKeyFromAgent(userName);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp