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

Added git_remote_url and git_remote_load by tbranyen · Pull Request #205 · 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
10 changes: 10 additions & 0 deletions generate/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 @@ -553,6 +553,16 @@
"return": {
"copy": "git_strarray_copy"
}
},

"git_remote_load": {
"ignore": false,
"isConstructorMethod": true
},

"git_remote_url": {
"ignore": false,
"args": [{ "isSelf": true }]
}
}
},
Expand Down
24 changes: 24 additions & 0 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
@@ -0,0 +1,24 @@
var assert = require("assert");
var path = require("path");

describe("Repository", function() {
var reposPath = path.resolve("test/repos/workdir/.git");

var Repository = require("../../lib/repository");
var Remote = require("../../lib/remote");

before(function() {
var test = this;

return Repository.open(reposPath).then(function(repository) {
test.repository = repository;
});
});

it("can read git remote url", function() {
return Remote.load(this.repository, "origin").then(function(remote) {
assert.ok(remote instanceof Remote);
assert.equal(remote.url(), "https://github.com/nodegit/nodegit");
});
});
});

Back | FazBrowse Home | New Git URL