Skip to content

Commit d8426a2

Browse files
committed
Make setUrl async
1 parent 02edea7 commit d8426a2

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

generate/input/descriptor.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,6 +2027,12 @@
20272027
"isErrorCode": true
20282028
}
20292029
},
2030+
"git_submodule_set_url": {
2031+
"isAsync": true,
2032+
"return": {
2033+
"isErrorCode": true
2034+
}
2035+
},
20302036
"git_submodule_status": {
20312037
"isAsync": true,
20322038
"args": {

test/tests/submodule.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ describe("Submodule", function() {
5353
});
5454
});
5555

56+
it("can set submodule url", function() {
57+
var repo = this.workdirRepository;
58+
var submoduleName = "vendor/libgit2";
59+
var submoduleUrl = "https://github.com/githubtraining/hellogitworld.git";
60+
61+
return Submodule.setUrl(repo, submoduleName, submoduleUrl)
62+
.then(function() {
63+
return Submodule.lookup(repo, submoduleName);
64+
})
65+
.then(function(submodule) {
66+
assert.equal(submoduleUrl, submodule.url());
67+
});
68+
});
69+
5670
it("can setup and finalize submodule add", function() {
5771
var repo = this.repository;
5872
var submodulePath = "hellogitworld";

0 commit comments

Comments
 (0)